diff options
author | xengineering <me@xengineering.eu> | 2024-01-20 15:20:02 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-01-20 21:25:20 +0100 |
commit | ce3aad39474789faa7e3c8fd49a6f401c8fa3c01 (patch) | |
tree | ecd7a852733d8c01f6e4285b5268c3c031f65813 | |
parent | e7f055deddf551c32de631c4579c53589ea14948 (diff) | |
download | soundbox-ce3aad39474789faa7e3c8fd49a6f401c8fa3c01.tar soundbox-ce3aad39474789faa7e3c8fd49a6f401c8fa3c01.tar.zst soundbox-ce3aad39474789faa7e3c8fd49a6f401c8fa3c01.zip |
doc: Add OpenRC service configuration
This makes sure the audio-receiving software `ffplay` runs all the time.
-rw-r--r-- | doc/documentation.tex | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex index fb004f7..1162727 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -226,7 +226,8 @@ apk add To make the soundbox device discoverable inside the network the Link Layer Discovery Protocol (LLDP) is used. With \texttt{echo} a new configuration file for the \texttt{lldpd} software can be added. After configuration the -\texttt{lldpd} service is enabled to start by default with the next reboot. +\texttt{lldpd} service is enabled via \texttt{rc-update} to start by default +with the next reboot. \begin{verbatim} echo 'configure system hostname soundbox.local @@ -264,6 +265,25 @@ option has to be inserted instead: echo 'dtparam=audio=on' >> /media/mmcblk0p1/config.txt \end{verbatim} +\subsection{Service configuration} + +To receive audio streams via the network it is required to run the +\texttt{ffplay} command continuously. This is possible by creating a service +file for the OpenRC init system with \texttt{echo} and enabling the service +with \texttt{rc-update}. + +\begin{verbatim} +echo '#!/sbin/openrc-run + +name="soundbox" +command="/usr/bin/ffplay" +command_args="udp://224.0.0.99:5316" +pidfile="/run/soundbox.pid" +command_background=true' > /etc/init.d/soundbox + +rc-update add soundbox default +\end{verbatim} + \subsection{Persistence of changes and reboot} Since a diskless Alpine Linux installation is preferred for soundbox the |