summaryrefslogtreecommitdiffstats
path: root/scripts/xds-stop-server.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xds-stop-server.sh')
-rw-r--r--scripts/xds-stop-server.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/xds-stop-server.sh b/scripts/xds-stop-server.sh
new file mode 100644
index 0000000..8a6bf5e
--- /dev/null
+++ b/scripts/xds-stop-server.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
+