1
0

Run liquidsoap as a separate service instead. Added a -no-liquidsoap flag to radio service. systemd.service renamed to radio.service. Version was set to 23.24.0.

This commit is contained in:
Alexander Andreev 2023-06-12 21:34:56 +04:00
parent 3ef213ab0d
commit 914784bb9f
Signed by: Arav
GPG Key ID: D22A817D95815393
4 changed files with 43 additions and 5 deletions

View File

@ -6,7 +6,7 @@ SYSDDIR:=${SYSDDIR_:/%=%}
DESTDIR:= DESTDIR:=
PREFIX:=/usr/local PREFIX:=/usr/local
VERSION=23.21.0 VERSION=23.24.0
FLAGS:=-modcacherw -trimpath FLAGS:=-modcacherw -trimpath
LDFLAGS:= -ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo LDFLAGS:= -ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
@ -32,7 +32,8 @@ install:
install -Dm 0644 configs/radio.vars.liq ${DESTDIR}/etc/dwelling/radio.vars.liq install -Dm 0644 configs/radio.vars.liq ${DESTDIR}/etc/dwelling/radio.vars.liq
install -Dm 0644 configs/logrotate ${DESTDIR}/etc/logrotate.d/${TARGET} install -Dm 0644 configs/logrotate ${DESTDIR}/etc/logrotate.d/${TARGET}
install -Dm 0644 init/systemd.service ${DESTDIR}/${SYSDDIR}/${TARGET}.service install -Dm 0644 init/radio.service ${DESTDIR}/${SYSDDIR}/${TARGET}.service
install -Dm 0644 init/liquidsoap.service ${DESTDIR}/${SYSDDIR}/${TARGET}-liquidsoap.service
uninstall: uninstall:
rm ${DESTDIR}${PREFIX}/bin/${TARGET} rm ${DESTDIR}${PREFIX}/bin/${TARGET}

View File

@ -1,6 +1,6 @@
# Maintainer: Alexander "Arav" Andreev <me@arav.su> # Maintainer: Alexander "Arav" Andreev <me@arav.su>
pkgname=dwelling-radio pkgname=dwelling-radio
pkgver=23.21.0 pkgver=23.24.0
pkgrel=1 pkgrel=1
pkgdesc="Arav's dwelling / Radio" pkgdesc="Arav's dwelling / Radio"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')

38
init/liquidsoap.service Normal file
View File

@ -0,0 +1,38 @@
[Unit]
Description=Arav's dwelling / Radio / Liquidsoap
Requires=icecast.service
After=network-online.target icecast.service
[Service]
Type=simple
Restart=on-failure
User=dwelling-radio
DynamicUser=yes
ExecStart=/opt/opam/4.14.0/bin/liquidsoap /etc/dwelling/radio.liq
ReadOnlyPaths=/
LogsDirectory=dwelling-radio
AmbientCapabilities=
CapabilityBoundingSet=
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target

View File

@ -7,12 +7,11 @@ After=network-online.target icecast.service
Type=simple Type=simple
Restart=on-failure Restart=on-failure
DynamicUser=yes DynamicUser=yes
ExecStart=/usr/bin/dwelling-radio -conf /etc/dwelling/radio.yaml ExecStart=/usr/bin/dwelling-radio -no-liquidsoap -conf /etc/dwelling/radio.yaml
ReadOnlyPaths=/ ReadOnlyPaths=/
LogsDirectory=dwelling-radio LogsDirectory=dwelling-radio
RuntimeDirectory=dwelling-radio
AmbientCapabilities= AmbientCapabilities=
CapabilityBoundingSet= CapabilityBoundingSet=