Thanks for the extra info Nan.
I've changed the init script to support the status option, but to no
avail...

+  . /lib/lsb/init-functions
+
+  status)
+     status_of_proc -p $PID && exit 0 || exit $?
+     ;;

after this the status option works, but puppet still cannot start the
daemon...
as a workaround I can reboot the client (since the daemon does start
after a reboot because of the rc2.d symlink created by the mantifest
file), but this is not really an option...

The only thing I can think of right now is that the zabbix_agent
daemon needs to run as user zabbix, and puppet can't get it to run
that way (I know really far fetched, but I'm getting out of options
here..)


On 30 sep, 18:26, Nan Liu <n...@puppetlabs.com> wrote:
> 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 thezabbixmanifest
> > 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="Zabbixagent"
> > 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/zabbixstatus
>
> 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- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

-- 
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.

Reply via email to