aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/xds-stop-server.sh
blob: 8a6bf5e285f71a821e645023a5da21d4cf30414e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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