changeset 1062:5aaa48712c23

vanilla: update rc-ssd template
author David Demelier <markand@malikania.fr>
date Mon, 02 Sep 2019 21:22:00 +0200
parents 52b36e54f1b7
children ad3e2cbdcf24
files Templates/init/rc-ssd
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Templates/init/rc-ssd	Mon Sep 02 21:20:00 2019 +0200
+++ b/Templates/init/rc-ssd	Mon Sep 02 21:22:00 2019 +0200
@@ -31,7 +31,10 @@
 		echo "template is already running with pid: $(cat $TEMPLATE_PID)"
 	else
 		echo "Starting template: $TEMPLATE_CMD $TEMPLATE_ARGS"
-		start-stop-daemon -Sbvp $TEMPLATE_PID -x $TEMPLATE_CMD -- $TEMPLATE_ARGS
+		start-stop-daemon \
+			-Sbvp $TEMPLATE_PID \
+			-m $TEMPLATE_PID \
+			-x $TEMPLATE_CMD -- $TEMPLATE_ARGS
 	fi
 }
 
@@ -48,7 +51,8 @@
 {
 	if [ -s $TEMPLATE_PID ]; then
 		echo "Stopping template."
-		start-stop-daemon -Kp $TEMPLATE_PID
+		start-stop-daemon -Kqp $TEMPLATE_PID
+		rm -f $TEMPLATE_PID
 	fi
 }