7 [ -r /etc
/conf.d
/sks
] && .
/etc
/conf.d
/sks
10 SKSDBPID
=/var
/run
/sks
/sksdb.pid
11 SKSRECONPID
=/var
/run
/sks
/sksrecon.pid
13 # See if the daemon is there
14 test -e $DAEMON ||
exit 0
16 if [ ! -x $DAEMON ]; then
17 echo "ERROR: $DAEMON is not executable"
23 stat_busy
"Starting sks daemons:"
25 if [ "$initstart" != "yes" ]; then
26 stat_append
" Not starting sks (as configured in /etc/conf.d/sks)"
31 mkdir
-p `dirname "$SKSDBPID"`
32 chown sks
`dirname "$SKSDBPID"`
34 [ -d /var
/lib
/sks
/DB
] || su
-c "$DAEMON build" sks
36 stat_append
" sksdb.."
38 su
-c "$DAEMON db &>> /var/log/sks/dboutput.log &" sks
39 PID
=$
(pgrep
-of "$DAEMON db")
40 echo "$PID" > $SKSDBPID
42 stat_append
" sksrecon.."
44 su
-c "$DAEMON recon &>> /var/log/sks/reconoutput.log &" sks
45 PID
=$
(pgrep
-of "$DAEMON recon")
46 echo "$PID" > $SKSRECONPID
52 stat_busy
"Stopping sks daemons:"
54 stat_append
"sksrecon"
55 if [ -f $SKSRECONPID ]; then
56 PID
="$(cat $SKSRECONPID)"
58 if [ -n "$PID" ]; then
59 kill $PID 2> /dev
/null
71 if [ -f $SKSDBPID ]; then
72 PID
="$(cat $SKSDBPID)"
74 if [ -n "$PID" ]; then
75 kill $PID 2> /dev
/null
95 echo "Usage: $0 {start|stop|restart}"