Ad Widget

Collapse

Update gentoo init script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Erton
    Junior Member
    • Feb 2010
    • 8

    #1

    Update gentoo init script

    The gentoo init scripts is outdated for new zabbix installs and not looks like other gentoo init scripts, a update suggetion looks like:

    zabbix-server:
    Code:
    #!/sbin/runscript
    #
    # Zabbix server start/stop script.
    #
    # Written by A.Tophofen
    # Revised by E.Ossandón
    DESC="Zabbix server"
    NAME=zabbix_server
    DAEMON=/usr/local/sbin/$NAME
    PID=/tmp/$NAME.pid
    
    depend() {
    	need net
    }
    
    start() {
    	ebegin "Starting $DESC"
    	start-stop-daemon --start -c zabbix:zabbix --exec $DAEMON
    	eend $?
    }
    
    stop() {
    	ebegin "Stopping $DESC"
    	start-stop-daemon --stop -u zabbix --pidfile $PID
    	eend $?
    }
    zabbix-agentd:
    Code:
    #!/sbin/runscript
    #
    # Zabbix agent start/stop script.
    #
    # Written by A.Tophofen
    # Revised by E.Ossandón
    DESC="Zabbix agent"
    NAME=zabbix_agentd
    DAEMON=/usr/local/sbin/$NAME
    PID=/tmp/$NAME.pid
    
    depend() {
    	need net
    }
    
    start() {
    	ebegin "Starting $DESC"
    	start-stop-daemon --start -c zabbix:zabbix --exec $DAEMON
    	eend $?
    }
    
    stop() {
    	ebegin "Stopping $DESC"
    	start-stop-daemon --stop -u zabbix --pidfile $PID
    	eend $?
    }
    Greetings
Working...