new version of rc.darkice

This commit is contained in:
rafael@riseup.net 2010-12-21 13:32:59 +00:00
parent 84760a8f0c
commit 704124e400
1 changed files with 90 additions and 89 deletions

View File

@ -1,12 +1,13 @@
#!/bin/sh #!/bin/sh
# generic init file for darkice # generic init file for darkice
# #
# Author:
# Niels Dettenbach - nd@syndicat.com - 2009-11-05 # Niels Dettenbach - nd@syndicat.com - 2009-11-05
# Last Change: 2010-12-21
# #
# License: # thanks to:
# GPLv3 (2009) # - Roland Whitehead
# # GPL (2009)
# 0.7
## settings ## ## settings ##
# check your paths! # check your paths!
@ -42,9 +43,9 @@ case $1 in
if ( [ "$progname" == "$running" ] ); then if ( [ "$progname" == "$running" ] ); then
echo "$progname is still running" echo "$progname is still running"
else else
echo "$progname seems crashed - PID does not match the deamon" echo "$progname seems crashed - PID ($PID) does not match the deamon"
echo "removing stale PID File $pidfile" echo "removing stale PID File $pidfile"
rm $pidfile rm -f $pidfile
$0 start $0 start
exit $? exit $?
fi fi
@ -73,7 +74,7 @@ case $1 in
kill -s TERM $PID 2> /dev/null kill -s TERM $PID 2> /dev/null
echo echo
sleep $restart_delay sleep $restart_delay
rm $pidfile rm -f $pidfile
echo " stopped" echo " stopped"
else else
echo "$progname not running" echo "$progname not running"