X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fxds-server-stop.sh;fp=scripts%2Fxds-server-stop.sh;h=8a6bf5e285f71a821e645023a5da21d4cf30414e;hb=472d4b34027f37b05f10d5558d28d6c6bca74ff2;hp=0000000000000000000000000000000000000000;hpb=cd39a10faf25c07bd235824c5606bf7f08f63182;p=src%2Fxds%2Fxds-server.git diff --git a/scripts/xds-server-stop.sh b/scripts/xds-server-stop.sh new file mode 100755 index 0000000..8a6bf5e --- /dev/null +++ b/scripts/xds-server-stop.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Stop it gracefully +pkill -INT xds-server +sleep 1 + +# Seems no stopped, nasty kill +nbProc=$(ps -ef |grep xds-server |grep -v grep |wc -l) +if [ "$nbProc" != "0" ]; then + pkill -KILL xds-server +fi + +nbProc=$(ps -ef |grep syncthing |grep -v grep |wc -l) +if [ "$nbProc" != "0" ]; then + pkill -KILL syncthing + pkill -KILL syncthing-inotify +fi +