2 DAEMON
=$
(type -p puppetd
)
6 [ -f /etc
/conf.d
/puppet
] && .
/etc
/conf.d
/puppet
8 PID
=$
(pidof
-xo %PPID
$DAEMON)
11 stat_busy
"Starting Puppet Daemon"
12 if [ -z "$PID" ]; then
13 [ -f /var
/run
/puppet.pid
] && rm -f /var
/run
/puppet.pid
16 if [ ! -z "$PID" -o $?
-gt 0 ]; then
19 PID
=$
(pidof
-xo %PPID
$DAEMON)
20 echo $PID > /var
/run
/puppet.pid
26 stat_busy
"Stopping Puppet Daemon"
27 [ ! -z "$PID" ] && kill $PID &> /dev
/null
32 rm -f /var
/run
/puppet.pid
38 if [ ! -z $PID ]; then
39 while ps
-p $PID > /dev
/null
; do sleep 1; done
44 echo "usage: $0 {start|stop|restart}"