Radiko recording server on Raspberry Pi 4 (Docker unused)

Introduction

The road to Docker in the arm64v8 environment of Raspberry Pi 4 was steep ... It wasn't easy to convert the Dockerfiles created for x86_64 to arm64v8 in the past. I broke my heart because I couldn't build (I could barely run). What are you guys doing? (Reference: https://github.com/docker/distribution/issues/3008)

We prioritized the operation of the service once and built the environment without Docker.

It was quite troublesome to find out how to create a systemd Unit file after a long time. I'll leave it as a memo for myself.

Postscript) 2020/11/14 The config.json was written incorrectly, so I fixed it. 2020/11/14 Added the setting to automatically delete from the one one month ago in crontab.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
$ sudo su -
# apt update
# apt install rtmpdump swftools libxml2-utils
# go get github.com/mtkhs/radicast
# mkdir -p /opt/service/radicast
# cd /opt/service/radicast
# vim config.json
# mkdir output
# vim /etc/systemd/system/radicast.service
# systemctl enable radicast
# systemctl start radicast
# crontab -e

config.json


{
  "BAYFM78": [],
  "FMJ": [],
  "FMT": [],
  "HOUSOU-DAIGAKU": [],
  "INT": [],
  "JOAB": [],
  "JOAK": [],
  "JOAK-FM": [],
  "JORF": [],
  "LFR": [
    "0 1 * * FRI"
  ],
  "NACK5": [],
  "QRR": [],
  "RN1": [],
  "RN2": [],
  "TBS": [
    "0 0 * * WED",
    "0 1 * * WED",
    "0 0 * * FRI",
    "30 3 * * SUN"
  ],
  "YFM": []
}

radicast.service


[Unit]
Description=Radicast service
After=networking.service
Requires=networking.service

[Service]
Type=simple
WorkingDirectory=/opt/service/radicast
ExecStart=/root/go/bin/radicast
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

crontab


0 5 * * * find /opt/service/radicast/output/ -mtime +31 -delete

end

After this, I'll use nginx to make it accessible via podcast from the outside.

Recommended Posts

Radiko recording server on Raspberry Pi 4 (Docker unused)
Install Docker on Raspberry Pi
Minecraft server on Raspberry Pi 4
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
I installed Docker on my Raspberry Pi 3
Launched Redmine with Docker on Raspberry Pi 3
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Send emails using Docker container on Raspberry Pi 3
Put Ubuntu 20.04.1 on Raspberry Pi 4
Install Docker on Ubuntu Server 20.04
Try putting CentOS 8 on Raspberry Pi 3
Note: setting javaMail on Raspberry Pi
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Raspberry Pi Kubernetes and Docker downgraded story
Put Kanban in Docker of Raspberry Pi 3
I tried running Docker on Windows Server 2019
Install CentOS 7 on Raspberry pi 4 Model B
Serially connect to Ubuntu on Raspberry Pi
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
I couldn't install docker with raspberry pi2 b +.
Liberty on Docker
Redmine on Docker
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
How to run javafx with Raspberry Pi Posted on 2020/07/12
Play down with Raspberry PI4 as a server. Part 2
[ARM64] Docker server monitoring with New Relic on Docker on RasPi4
Display characters on I2C 1602 LCD with Raspberry Pi 3 & Java