blob: e052a854fdd4a8efe8306d0f13d95201da33a969 (
plain)
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
|
#!/bin/sh
#
# Bcfg2Server - Bcfg2 configuration daemon
#
# chkconfig: 2345 19 81
# description: bcfg2 server for configuration requests
#
PIDFILE=/var/tmp/bcfg2-server.pid
case "$1" in
start)
echo -n "Starting bcfg2-server: "
if [ -f "/etc/SuSE-release" ] ; then
/sbin/start_daemon -p "${PIDFILE}" /usr/sbin/bcfg2-server
elif [ -f "/etc/redhat-release" ]; then
/usr/sbin/bcfg2-server -D "${PIDFILE}"
else
/sbin/start-stop-daemon --pidfile "${PIDFILE}" --make-pidfile -b -S --startas /usr/sbin/bcfg2-server
fi
echo "bcfg2-server"
;;
stop)
echo -n "Stopping bcfg2-server: "
if [ -f "/etc/SuSE-release" ] ; then
/sbin/killproc -p "${PIDFILE}" /usr/sbin/bcfg2-server
elif [ -f "/etc/redhat-release" ]; then
kill -INT `cat ${PIDFILE}`
else
/sbin/start-stop-daemon -p "${PIDFILE}" -K /usr/sbin/bcfg2-server
fi
echo done
;;
restart)
$0 stop
sleep 5
$0 start
;;
force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: bcfg2-server {start|stop|restart|force-reload}"
exit 1
esac
exit 0
|