1
0

Due to all the strange headaches with liquidsoap and since I don't have any jingles or live streams I added support for ezstream.

This commit is contained in:
Alexander Andreev 2023-09-21 02:00:28 +04:00
parent 89f7d0e49c
commit bb2c7e4e6d
Signed by: Arav
GPG Key ID: D22A817D95815393
3 changed files with 100 additions and 0 deletions

41
configs/ezstream.xml Normal file
View File

@ -0,0 +1,41 @@
<ezstream>
<servers>
<server>
<name>default</name>
<protocol>HTTP</protocol>
<hostname>127.0.0.1</hostname>
<port>8001</port>
<password></password>
</server>
</servers>
<streams>
<stream>
<name>default</name>
<mountpoint>/stream.ogg</mountpoint>
<public>Yes</public>
<intake>default</intake>
<server>default</server>
<format>Ogg</format>
<stream_name>Arav's dwelling / Radio</stream_name>
<stream_url>https://radio.arav.su</stream_url>
<stream_genre>Various</stream_genre>
<stream_description>Broadcasting from under my desk.</stream_description>
<stream_bitrate>128</stream_bitrate>
<stream_samplerate>44100</stream_samplerate>
<stream_channels>2</stream_channels>
</stream>
</streams>
<intakes>
<intake>
<name>default</name>
<type>playlist</type>
<filename>/mnt/data/appdata/radio/playlists/all-rand</filename>
</intake>
</intakes>
<metadata>
<format_str>@a@ - @t@</format_str>
<refresh_interval>-1</refresh_interval>
<normalize_strings>No</normalize_strings>
<no_updates>No</no_updates>
</metadata>
</ezstream>

54
init/ezstream.service Normal file
View File

@ -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

View File

@ -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