systemctl start sonospy.service
useradd -r sonospy -d /usr/local/share/sonospy
ln ~sonospy/sonospy.service /etc/systemd/system/systemctl enable sonospy.service
more ~sonospy/sonospy.service
[Unit]
Description=Library Manager for Sonos
After=syslog.target
After=network.target
[Service]
Type=simple
User=sonospy
Group=sonospy
WorkingDirectory=/usr/local/share/sonospy/sonospy-msrefactor5/sonospy
Nice=-1
StandardInput=null
StandardOutput=journal
StandardError=journal
# Note: if start fails check with "systemctl status sonospy" or journalctl -u sonospy
Environment=LD_LIBRARY_PATH=/usr/local/lib
Environment=SONOS_ZP=<ZP_ADDRESS>
ExecStart=/usr/bin/python pycpoint.py -p -sSonospy=CD,$HOME/standard-sonos.db -sSonospy=Hi,$HOME/hi-sonos.db -r -d -z $SONOS_ZP
Restart=always
RestartSec=1min
TimeoutSec=15
[Install]
WantedBy=multi-user.target
ExecStart=/usr/bin/python pycpoint.py -p -sSonospy=CD,$HOME/standard-sonos.db -sSonospy=Hi,$HOME/hi-sonos.db -r -d -z $SONOS_ZP
ExecStart=/usr/bin/python pycpoint.py -p -sSonospy=CD,/user/sonospy/standard-sonos.db -sSonospy=Hi,/user/sonospy/hi-sonos.db -r -d -z $SONOS_ZP
ExecStart=/usr/bin/python pycpoint.py -p -sSonospy=CD,${HOME}/standard-sonos.db -sSonospy=Hi,${HOME}/hi-sonos.db -r -d -z ${SONOS_ZP}
I love it when someone answers their own question :o)
--
You received this message because you are subscribed to the Google Groups "Sonospy Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonospy-deve...@googlegroups.com.
To post to this group, send email to sonosp...@googlegroups.com.
Visit this group at https://groups.google.com/group/sonospy-devel.
For more options, visit https://groups.google.com/d/optout.
You don't need both -r and -z in your command line. -r registers with the first ZP it finds, whereas -z forces it to use the one you specify (and overrides -r).
Mark.
Actually, it will expand them but the syntax is ${} for variables so the working version is:ExecStart=/usr/bin/python pycpoint.py -p -sSonospy=CD,${HOME}/standard-sonos.db -sSonospy=Hi,${HOME}/hi-sonos.db -r -d -z ${SONOS_ZP}