blob: fb4e0cbe5b04c25a122c115039f19cdd35469f3e (
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
49
50
51
52
53
|
#!/bin/sh
#
# Bcfg2Server - Bcfg2 configuration daemon
#
# chkconfig: 2345 19 81
# description: bcfg2 server for configuration requests
#
### BEGIN INIT INFO
# Provides: bcfg2-server
# Required-Start: $network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Configuration management Server
# Description: Bcfg2 is a configuration management system that builds
# installs configuration files served by bcfg2-server
### END INIT INFO
PIDFILE=/var/tmp/bcfg2-server.pid
msg=echo
fail=echo
case "$1" in
start)
$msg -n "Starting bcfg2-server: "
if [ -f "/etc/debian_version" ] ; then
/sbin/start-stop-daemon --pidfile "${PIDFILE}" --make-pidfile -b -S --startas /usr/sbin/bcfg2-server
else
/usr/sbin/bcfg2-server -D "${PIDFILE}"
fi
$msg "bcfg2-server"
;;
stop)
$msg -n "Stopping bcfg2-server: "
if [ -f "/etc/debian_version" ] ; then
/sbin/start-stop-daemon -p "${PIDFILE}" -K /usr/sbin/bcfg2-server
else
kill -INT `cat ${PIDFILE}`
fi
echo done
;;
restart|force-reload|reload)
$0 stop
sleep 5
$0 start
;;
*)
${msg} "Usage: $0 {start|stop|status|reload|restart|force-reload}"
exit 1
esac
exit 0
|