blob: 3ad5a9e07530a7aba1765fb6837652a3d0a50032 (
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
|
#!/bin/sh
pidfile="/var/run/puppet/puppetmasterd.pid"
options="--pidfile $pidfile"
puppetmaster_start() {
echo "Starting puppetmaster"
start-stop-daemon --start --quiet \
--pidfile $pidfile \
--exec /usr/bin/puppetmasterd -- $options
if [ "$?" != "0" ]; then
echo "Failed to start puppetmaster"
fi
}
puppetmaster_stop() {
echo "Stopping puppetmaster"
start-stop-daemon --stop --quiet \
--pidfile $pidfile
if [ "$?" != "0" ]; then
echo "Failed to stop puppetmaster"
fi
rm -f "/var/run/puppet/puppetmasterd.pid"
}
case "$1" in
'start')
puppetmaster_start
;;
'stop')
puppetmaster_stop
;;
'restart')
puppetmaster_stop
puppetmaster_start
;;
*)
echo "usage $0 start|stop|restart"
esac
|