On Thu, Sep 30, 2010 at 8:46 AM, D.N. van der Meijden <cybernijn...@gmail.com> wrote: > Here's the init script: > > (by the way, I changed the service to rsyslog [in the zabbix manifest > file] and this works like a charm. So the service action works in > puppet...) > > #! /bin/sh > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc/zabbix:/etc/zabbix/bin:/etc/ > zabbix/sbin > DAEMON=/etc/zabbix/sbin/zabbix_agentd > NAME=zabbix_agentd > DESC="Zabbix agent" > PID=/var/tmp/$NAME.pid > > test -f $DAEMON || exit 0 > set -e > case "$1" in > start) > echo "Starting $DESC: $NAME" > start-stop-daemon --oknodo --start --pidfile $PID \ > --exec $DAEMON > ;; > stop) > echo "Stopping $DESC: $NAME" > start-stop-daemon --oknodo --stop --pidfile $PID \ > --exec $DAEMON > ;; > restart|force-reload) > $0 stop > $0 start > ;; > *) > N=/etc/init.d/$NAME > echo "Usage: $N {start|stop|restart|force-reload}" >&2 > exit 1 > ;; > esac > exit 0
The script does not provide status, so when hasstatus is set to true, puppet is querying service state via an invalid command: /etc/init.d/zabbix status This will always fail, which makes puppet think the service is always stopped. I would look at: http://www.nowvox.com/contrib/zabbix/zabbix_agentd Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.