Hello,
as I think Zabbix is really a wonderfull soft, I want to contribute to its developpment.
I have compiled my own zabbix from sources and installed it in a custom directory. Then I would like to use init.d scripts which are given with sources... but for a custom installation, it doesn't work...
So I've modified the script :
Replacing :
By :
And replacing :
By :
In this way, the daemon use my own config file, with my user, in my path...
But as it's my first init script, I would like to have feedbacks about this. And if you think this idea is good, I think it could be modified in the next release of zabbix.
What do you think about it ?
as I think Zabbix is really a wonderfull soft, I want to contribute to its developpment.
I have compiled my own zabbix from sources and installed it in a custom directory. Then I would like to use init.d scripts which are given with sources... but for a custom installation, it doesn't work...
So I've modified the script :
Replacing :
Code:
NAME=zabbix_agentd
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/home/zabbix/bin/${NAME}
DESC="Zabbix agent daemon"
PID=/var/tmp/$NAME.pid
Code:
NAME=zabbix_agentd
CONFIGFILE=zabbix_agentd.conf
ZABPATH=/usr/local/zabbix
CONFPATH="${ZABPATH}/etc/${CONFIGFILE}"
PATH=/bin:/usr/bin:/sbin:/usr/sbin:${ZABPATH}/sbin
DAEMON="${ZABPATH}/sbin/${NAME}"
OPTIONS="-c ${CONFPATH}"
DESC="Zabbix agent daemon"
PID="${ZABPATH}/var/tmp/${NAME}.pid"
Code:
start)
echo "Starting $DESC: $NAME"
start-stop-daemon --oknodo --start --pidfile $PID \
--exec $DAEMON
;;
Code:
start)
echo "Starting $DESC: $NAME"
start-stop-daemon --oknodo --start --pidfile $PID \
--exec ${DAEMON} -- ${OPTIONS}
;;
But as it's my first init script, I would like to have feedbacks about this. And if you think this idea is good, I think it could be modified in the next release of zabbix.
What do you think about it ?

Comment