summaryrefslogtreecommitdiffstats
path: root/debian/bcfg2-server.bcfg2-xmlrpc.init
blob: 6d4b74c36fbbb17886e35a4a47188b7d870760db (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
#!/bin/sh
#
# Bcfg2Server - Bcfg2 configuration daemon
#
# chkconfig: 2345 19 81
# description: bcfg2 server for configuration requests
# 

PIDFILE=/var/tmp/bcfg2-xmlrpc.pid
PIDOPTS="--pidfile ${PIDFILE}"

case "$1" in
  start)
    echo -n "Starting Bcfg2ServerX: "
    start-stop-daemon --make-pidfile "${PIDOPTS}" -b -S --startas /usr/sbin/Bcfg2ServerX 
    echo "Bcfg2Server"
    ;;
  stop)
    echo -n "Stopping Bcfg2Server: "
    start-stop-daemon "${PIDOPTS}"  -K /usr/sbin/Bcfg2ServerX
    echo done
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  force-reload)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: bcfg2-xmlrpc-server {start|stop|restart|force-reload}"
    exit 1
esac

exit 0