public
Created

Headphones systemd

  • Download Gist
headphones.service
1 2 3 4 5 6 7 8 9 10 11 12 13
[Unit]
Description=Headphones Daemon
 
[Service]
EnvironmentFile=/etc/conf.d/headphones_systemd
ExecStart=/usr/bin/headphones -q -d --config ${CONF} --port ${PORT}
GuessMainPID=no
Type=forking
User=headphones
Group=headphones
 
[Install]
WantedBy=multi-user.target
headphones_systemd
1 2
PORT="8181"
CONF="/opt/headphones/config.ini"

This works for me. I don't guarantee that it works for you.

It throws a fit if I use a variable for User and Group, no idea why. Edit as you see fit.

Files:
/usr/lib/systemd/system/headphones.service
/etc/conf.d/headphones_systemd

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.