You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
696 B
36 lines
696 B
1 year ago
|
#!/bin/sh
|
||
|
#
|
||
|
# Zabbix agent start/stop script.
|
||
|
#
|
||
|
# Copyright (C) 2001-2023 Zabbix SIA
|
||
|
|
||
|
NAME=zabbix_agentd
|
||
|
DAEMON=/usr/local/sbin/${NAME}
|
||
|
DESC="Zabbix agent daemon"
|
||
|
PID=/tmp/$NAME.pid
|
||
|
|
||
|
test -f $DAEMON || exit 0
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
echo "Starting $DESC: $NAME"
|
||
|
start-stop-daemon --start --oknodo --pidfile $PID --exec $DAEMON
|
||
|
;;
|
||
|
stop)
|
||
|
echo "Stopping $DESC: $NAME"
|
||
|
start-stop-daemon --stop --quiet --pidfile $PID --retry=TERM/10/KILL/5 && exit 0
|
||
|
start-stop-daemon --stop --oknodo --exec $DAEMON --name $NAME --retry=TERM/10/KILL/5
|
||
|
;;
|
||
|
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
|