View Full Version : Init.d scripts for CentOS 4.x
Hey everyone,
I created init.d scripts for zabbix_agentd and zabbix_server that work with CentOS 4.x. They should also work with Whitebox Linux 4 and RHEL4.
They can be found here:
http://www.nowvox.com/contrib/zabbix/zabbix_server
http://www.nowvox.com/contrib/zabbix/zabbix_agentd
1. Copy them to /etc/rc.d/init.d/
2. Run /sbin/chkconfig --add zabbix_agentd
3. Run /sbin/chkconfig --add zabbix_server
Feedback and suggestions are appreciated.
Thanks
erisan500
26-06-2006, 00:05
Cool, i'll try them in the morning.
Greetings
davewinter
27-06-2006, 19:40
I got this
[root@localhost init.d]# /etc/init.d/zabbix_server start
: bad interpreter: No such file or directory
when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin
Hey everyone,
I created init.d scripts for zabbix_agentd and zabbix_server that work with CentOS 4.x. They should also work with Whitebox Linux 4 and RHEL4.
They can be found here:
http://www.nowvox.com/contrib/zabbix/zabbix_server
http://www.nowvox.com/contrib/zabbix/zabbix_agentd
1. Copy them to /etc/rc.d/init.d/
2. Run /sbin/chkconfig --add zabbix_agentd
3. Run /sbin/chkconfig --add zabbix_server
Feedback and suggestions are appreciated.
Thanks
erisan500
30-06-2006, 12:08
Well, it seems the scripts are not working ok.
Rebooting the server doesn't remove the pid files, and therefor zabbix won't start again after a reboot. (both server and agent)
Any idea?
Greetings
just2blue4u
30-06-2006, 13:08
Well, it seems the scripts are not working ok.
Rebooting the server doesn't remove the pid files, and therefor zabbix won't start again after a reboot. (both server and agent)
Any idea?
Greetings
same for me (but i use different initscripts). I would really be interested in how to make the scripts work correctly...
Sorry for the delay, it's been a busy week. I think the issue with the pid file not being removed is that on my system I have the pid file in /tmp as per the installation instructions. The pid files get removed on my system during a reboot/restart. Is anyone else placing the pid file in /tmp or are you guys placing it in the more common /var/run directory? I'd prefer to have it in /var/run but placed it in /tmp because the installation docs said to.
I'll take a look this weekend and post what I find. :-)
Thanks for the feedback.
I don't think there is anything wrong with your BASH ( because if your BASH was borked you'd definitely know it ) Changing the path set in the $progdir variable in the init script should not affect anything ( unless zabbix_server and zabbix_agentd aren't installed there :-) ). Try changing the first line of the init scripts from #!/bin/bash to #!/bin/sh and then run the init scripts. I've made this change to the files hosted on my site as well.
Let me know how it goes.
-Thanks
I got this
[root@localhost init.d]# /etc/init.d/zabbix_server start
: bad interpreter: No such file or directory
when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin
erisan500
10-07-2006, 23:53
Just to confirm, the script is working fine after i moved the pid file from /var/tmp to /tmp.
thanks
Greetings
pdwalker
24-07-2006, 10:54
I got this
[root@localhost init.d]# /etc/init.d/zabbix_server start
: bad interpreter: No such file or directory
when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin
If the files are in dos format(CRLF), change them to unix format(LF) and try again