Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Using shairport-sync with runit (Read 449 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Using shairport-sync with runit

Shairport-sync is a great tool to  emulate an Airplay device from linux (to use it's connected speakers wirelessly). Some configurations require using systemd. Does anyone know of a port of the systemd command to runit. I tried using it's daemon flag (-d) but the arch package hasn't compiled that feature in...
Also, simply running shairport-sync doesn't do anything (even with the -v flag)

Re: Using shairport-sync with runit

Reply #1
Create the shairport-sync user and shairport-sync group, create the service and link it to run.

In a terminal:

Code: [Select]
sudo groupadd shairport-sync
Code: [Select]
sudo useradd -G shairport-sync shairport-sync
Code: [Select]
sudo nano /etc/runit/sv/shairport/run

Add the following lines:
Code: [Select]
#!/bin/sh

sv check avahi-daemon  > /dev/null || exit 1
exec chpst -u shairport-sync shairport-sync

and make it executable by
Code: [Select]
sudo chmod +x /etc/runit/sv/shairport/run

and enable it after by linking:
Code: [Select]
sudo ln -s /etc/runit/sv/shairport /run/runit/service

and finally check it's status with the following:
Code: [Select]
sudo sv status shairport
Code: [Select]
ps aux | grep shairport

Awaiting your feedback.

 

Re: Using shairport-sync with runit

Reply #2
This seems to fix the issue.
Thanks!