-
Notifications
You must be signed in to change notification settings - Fork 0
/
sks.sh
36 lines (32 loc) · 825 Bytes
/
sks.sh
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
#!/bin/sh
DAEMON=/usr/local/bin/sks
DIR=/var/lib/sks
test -e $DAEMON || exit 0
test -d $DIR || exit 0
case "$1" in
start)
cd $DIR
echo -n "Starting SKS:"
echo -n \ sks_db
$DAEMON db &
echo -n \ sks_recon
$DAEMON recon &
echo "."
;;
stop)
echo -n "Stopping SKS:"
killall sks
while [ "`pidof sks`" ]; do sleep 1; done # wait until SKS processes have exited
echo "."
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0