mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
make and remove pidfile
This commit is contained in:
@ -36,7 +36,7 @@ case $1 in
|
|||||||
log_daemon_msg "Starting the process" "$NAME"
|
log_daemon_msg "Starting the process" "$NAME"
|
||||||
# Start the daemon with the help of start-stop-daemon
|
# Start the daemon with the help of start-stop-daemon
|
||||||
# Log the message appropriately
|
# Log the message appropriately
|
||||||
if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON --chuid $USER --background; then
|
if start-stop-daemon --start --quiet --oknodo --make-pidfile --pidfile $PIDFILE --exec $DAEMON --chuid $USER --background; then
|
||||||
log_end_msg 0
|
log_end_msg 0
|
||||||
else
|
else
|
||||||
log_end_msg 1
|
log_end_msg 1
|
||||||
@ -48,7 +48,7 @@ case $1 in
|
|||||||
if [ -e $PIDFILE ]; then
|
if [ -e $PIDFILE ]; then
|
||||||
status_of_proc -p $PIDFILE $DAEMON "Stoppping the $NAME process" && status="0" || status="$?"
|
status_of_proc -p $PIDFILE $DAEMON "Stoppping the $NAME process" && status="0" || status="$?"
|
||||||
if [ "$status" = 0 ]; then
|
if [ "$status" = 0 ]; then
|
||||||
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
|
start-stop-daemon --stop --quiet --oknodo --remove-pidfile --pidfile $PIDFILE
|
||||||
/bin/rm -rf $PIDFILE
|
/bin/rm -rf $PIDFILE
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user