tazpanel diff tazpanel @ rev 173
tazpanel: normalize daemon script
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 22 00:56:16 2011 +0200 (2011-05-22) |
parents | 30036a49cacd |
children | c863a98a4d66 |
line diff
1.1 --- a/tazpanel Fri Apr 15 12:04:15 2011 +0200 1.2 +++ b/tazpanel Sun May 22 00:56:16 2011 +0200 1.3 @@ -25,15 +25,22 @@ 1.4 # Commands 1.5 # 1.6 1.7 +NAME=tazpanel 1.8 +DESC="SliTaz administration and configuration panel." 1.9 +DAEMON=/usr/sbin/httpd 1.10 +PIDFILE=/var/run/$NAME.pid 1.11 + 1.12 case "$1" in 1.13 start) 1.14 gettext "Starting TazPanel web server on port $HTTPD_PORT..." 1.15 httpd -p $HTTPD_PORT -u root -c $HTTPD_CONF \ 1.16 -r "`gettext \"TazPanel Authentication\"`" & 1.17 + ps | grep 'httpd -p $HTTPD_PORT " | grep -v grep | \ 1.18 + awk '{ print $1 }' > $PIDFILE 1.19 status ;; 1.20 stop) 1.21 gettext "Stopping TazPanel web server..." 1.22 - killall httpd && status ;; 1.23 + kill $(cat $PIDFILE) && status ;; 1.24 passwd|-p) 1.25 echo "" 1.26 gettext "Changing password for TazPanel"