]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/client175
2 ########################################################################
3 # Begin $rc_base/init.d/
5 # Description : Client175 (MPD Client with Webinterface)
7 # Author : Arne Fitzenreiter
11 # Notes : for www.ipfire.org - GPLv3
13 ########################################################################
20 if [ -e /var
/run
/client175.pid
]; then
21 if ps
-p $
(cat /var
/run
/client175.pid
) > /dev
/null
23 boot_mesg
"Client175 is already running."
28 boot_mesg
"Starting Client175 MPD WebIF..."
29 sudo
-u nobody python
/srv
/client175
/server.py
> /var
/log
/client175
2>&1 &
30 echo $
! > /var
/run
/client175.pid
35 if [ ! -e /var
/run
/client175.pid
]; then
36 boot_mesg
"Client175 pidfile not found!"
40 boot_mesg
"Stopping Client175 MPD WebIF..."
41 kill $
(cat /var
/run
/client175.pid
)
43 rm -f /var
/run
/client175.pid
53 if [ -e /var
/run
/client175.pid
]; then
54 if ps
-p $
(cat /var
/run
/client175.pid
) > /dev
/null
57 boot_mesg
"Client175 is running with Process Id(s) $(cat /var/run/client175.pid)"
61 boot_mesg
"Client175 should not running"
66 echo "Usage: ${0} {start|stop|reload|restart|status}"
71 # End $rc_base/init.d/