-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstop-server
executable file
·61 lines (56 loc) · 1.24 KB
/
stop-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi
cd $1
echo "Stopping procer"
export pid_file="$PWD/run/procer.pid"
echo "looking for pid file: $pid_file"
if [ -f "$pid_file" ]
then
pid=`cat $pid_file`
kill $pid
rm -f $pid_file
echo "Stopped procer"
else
echo "no pid file found"
fi
echo "stopping mongrel2"
pid_file=`cat ./profiles/mongrel2/pid_file`
echo "looking for pid file: $pid_file"
if [ -f "$pid_file" ]
then
pid=`cat $pid_file`
kill $pid
rm -f $pid_file
echo "Stopped mongrel2"
else
echo "no pid file found"
fi
echo "stopping qoorateserver"
pid_file=`cat ./profiles/qoorateserver/pid_file`
echo "looking for pid file: $pid_file"
if [ -f "$pid_file" ]
then
pid=`cat $pid_file`
kill $pid
rm -f $pid_file
echo "Stopped qoorateserver"
else
echo "no pid file found"
fi
echo "stopping uploader"
pid_file=`cat ./profiles/uploader/pid_file`
echo "looking for pid file: $pid_file"
if [ -f "$pid_file" ]
then
pid=`cat $pid_file`
kill $pid
rm -f $pid_file
echo "Stopped uploader"
else
echo "no pid file found"
fi
echo "done stopping"