File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,21 @@ Stop () {
1919 PSPID=` ps -o pid,comm,args | awk ' {if($3 == "node-red" || $4 ~ /node-red/){print $1}}' `
2020 if [ " $PSPID " != " " ]
2121 then
22- echo -n " Stopping Node-RED: "
23- kill $1 $PSPID 2> /dev/null || true
24- sleep 1
25- kill -0 $PSPID 2> /dev/null
26- if [ $? -eq 0 ]
27- then
28- sleep 3
29- kill -KILL $PSPID 2> /dev/null
30- fi
31- logger -t homematic -p user.info " stopped node-red"
32- echo " OK"
22+ echo -n " Stopping Node-RED: "
23+ kill $1 $PSPID 2> /dev/null || true
24+ sleep 1
25+ kill -0 $PSPID 2> /dev/null
26+ if [ $? -eq 0 ]
27+ then
28+ sleep 3
29+ kill -KILL $PSPID 2> /dev/null
30+ fi
31+ logger -t homematic -p user.info " stopped node-red"
32+ echo " OK"
33+ return 0
3334 else
3435 echo " Node-RED not running"
35- exit 1
36+ return 1
3637 fi
3738}
3839
@@ -53,7 +54,7 @@ Start () {
5354case " $1 " in
5455
5556 stop)
56- Stop
57+ Stop || exit 1
5758 ;;
5859
5960 start)
You can’t perform that action at this time.
0 commit comments