From bb2c7e4e6d0b93ecba2955834186650e21148aff Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 21 Sep 2023 02:00:28 +0400 Subject: [PATCH] Due to all the strange headaches with liquidsoap and since I don't have any jingles or live streams I added support for ezstream. --- configs/ezstream.xml | 41 ++++++++++++++++++++++++++++++++ init/ezstream.service | 54 +++++++++++++++++++++++++++++++++++++++++++ tools/radioctl | 5 ++++ 3 files changed, 100 insertions(+) create mode 100644 configs/ezstream.xml create mode 100644 init/ezstream.service diff --git a/configs/ezstream.xml b/configs/ezstream.xml new file mode 100644 index 0000000..c27d0e2 --- /dev/null +++ b/configs/ezstream.xml @@ -0,0 +1,41 @@ + + + + default + HTTP + 127.0.0.1 + 8001 + + + + + + default + /stream.ogg + Yes + default + default + Ogg + Arav's dwelling / Radio + https://radio.arav.su + Various + Broadcasting from under my desk. + 128 + 44100 + 2 + + + + + default + playlist + /mnt/data/appdata/radio/playlists/all-rand + + + + @a@ - @t@ + -1 + No + No + + \ No newline at end of file diff --git a/init/ezstream.service b/init/ezstream.service new file mode 100644 index 0000000..e7c3974 --- /dev/null +++ b/init/ezstream.service @@ -0,0 +1,54 @@ +[Unit] +Description=Arav's dwelling / Radio / EZStream +Requires=icecast.service +After=network-online.target icecast.service + +[Service] +Type=simple +Restart=on-failure +User=dwelling-radio +DynamicUser=yes +ExecStart=/usr/bin/ezstream /etc/dwelling/ezstream.xml +ExecStop=/bin/kill -INT $MAINPID + +ReadOnlyPaths=/ + +LogsDirectory=dwelling-radio + +AmbientCapabilities= +CapabilityBoundingSet= + +LockPersonality=true +MemoryDenyWriteExecute=true +NoNewPrivileges=true +PrivateDevices=true +PrivateTmp=true +PrivateUsers=true +ProcSubset=pid +ProtectClock=true +ProtectControlGroups=true +ProtectHome=true +ProtectHostname=true +ProtectKernelLogs=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectProc=noaccess +ProtectSystem=strict +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX +RestrictNamespaces=true +RestrictRealtime=true +RestrictSUIDSGID=true +SystemCallArchitectures=native +SystemCallFilter=~@clock +SystemCallFilter=~@cpu-emulation +SystemCallFilter=~@debug +SystemCallFilter=~@module +SystemCallFilter=~@mount +SystemCallFilter=~@obsolete +SystemCallFilter=~@privileged +SystemCallFilter=~@raw-io +SystemCallFilter=~@reboot +SystemCallFilter=~@swap + +[Install] +WantedBy=multi-user.target diff --git a/tools/radioctl b/tools/radioctl index 84638b0..077bfa1 100644 --- a/tools/radioctl +++ b/tools/radioctl @@ -14,6 +14,11 @@ case $1 in cut -c 31- | sort -d > $radio_dir/playlists/all break ;; + pe | playlist-ezstream) + find -L $radio_dir/music/* -type f -iname '*.ogg' | + sort -d > $radio_dir/playlists/all + break + ;; s | shuffle) shuf $radio_dir/playlists/all > $radio_dir/playlists/all-rand break