summaryrefslogtreecommitdiffstats
path: root/misc/init.d/debian
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-28 13:32:10 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-28 13:32:10 +0000
commit3442ec61fa38eea4e68a3edea4ea3225ff78c8a0 (patch)
tree3ebf399a0be7c8ca22745e08ae2c0b4e300a86e5 /misc/init.d/debian
parentfb8127285b3156270151079a29825130cf85d524 (diff)
downloadzabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.tar.gz
zabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.tar.xz
zabbix-3442ec61fa38eea4e68a3edea4ea3225ff78c8a0.zip
- modifed startup scripts (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4187 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'misc/init.d/debian')
-rwxr-xr-xmisc/init.d/debian/zabbix-agent8
-rwxr-xr-xmisc/init.d/debian/zabbix-server (renamed from misc/init.d/debian/zabbix-suckerd)13
-rwxr-xr-xmisc/init.d/debian/zabbix-trapperd51
3 files changed, 11 insertions, 61 deletions
diff --git a/misc/init.d/debian/zabbix-agent b/misc/init.d/debian/zabbix-agent
index 78ac583e..234e5534 100755
--- a/misc/init.d/debian/zabbix-agent
+++ b/misc/init.d/debian/zabbix-agent
@@ -4,10 +4,10 @@
#
# Written by Alexei Vladishev <alexei.vladishev@zabbix.com>.
-PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
-DAEMON=/home/zabbix/bin/zabbix_agentd
NAME=zabbix_agentd
-DESC="Zabbix agent"
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
+DAEMON=/home/zabbix/bin/${NAME}
+DESC="Zabbix agent daemon"
PID=/var/tmp/$NAME.pid
test -f $DAEMON || exit 0
@@ -31,7 +31,7 @@ case "$1" in
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
-# echo -n "Restarting $DESC: zabbix_suckerd"
+# echo -n "Restarting $DESC: zabbix_agent"
$0 stop
$0 start
# start-stop-daemon --stop --quiet --pidfile \
diff --git a/misc/init.d/debian/zabbix-suckerd b/misc/init.d/debian/zabbix-server
index 6f2498a5..367dc3bc 100755
--- a/misc/init.d/debian/zabbix-suckerd
+++ b/misc/init.d/debian/zabbix-server
@@ -4,10 +4,11 @@
#
# Written by Alexei Vladishev <alexei.vladishev@zabbix.com>.
+NAME=zabbix_server
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
-DAEMON=/home/zabbix/bin/zabbix_suckerd
-NAME=zabbix_suckerd
-DESC="Zabbix sucker daemon"
+DAEMON=/home/zabbix/bin/${NAME}
+DESC="Zabbix server daemon"
+PID=/var/tmp/$NAME.pid
test -f $DAEMON || exit 0
@@ -16,12 +17,12 @@ set -e
case "$1" in
start)
echo "Starting $DESC: $NAME"
- start-stop-daemon --oknodo --start --pidfile /tmp/$NAME.pid \
+ start-stop-daemon --oknodo --start --pidfile $PID \
--exec $DAEMON
;;
stop)
echo "Stopping $DESC: $NAME"
- start-stop-daemon --oknodo --stop --pidfile /tmp/$NAME.pid \
+ start-stop-daemon --oknodo --stop --pidfile $PID \
--exec $DAEMON
;;
restart|force-reload)
@@ -30,7 +31,7 @@ case "$1" in
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
-# echo -n "Restarting $DESC: zabbix_suckerd"
+# echo -n "Restarting $DESC: zabbix_server"
$0 stop
$0 start
# start-stop-daemon --stop --quiet --pidfile \
diff --git a/misc/init.d/debian/zabbix-trapperd b/misc/init.d/debian/zabbix-trapperd
deleted file mode 100755
index c9330eb5..00000000
--- a/misc/init.d/debian/zabbix-trapperd
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-#
-# Zabbix daemon start/stop script.
-#
-# Written by Alexei Vladishev <alexei.vladishev@zabbix.com>.
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
-DAEMON=/home/zabbix/bin/zabbix_trapperd
-NAME=zabbix_trapperd
-DESC="Zabbix trapper daemon"
-
-test -f $DAEMON || exit 0
-
-set -e
-
-case "$1" in
- start)
- echo "Starting $DESC: $NAME"
- start-stop-daemon --oknodo --start --pidfile /tmp/$NAME.pid \
- --exec $DAEMON
- ;;
- stop)
- echo "Stopping $DESC: $NAME"
- start-stop-daemon --oknodo --stop --pidfile /tmp/$NAME.pid \
- --exec $DAEMON
- ;;
- restart|force-reload)
- #
- # If the "reload" option is implemented, move the "force-reload"
- # option to the "reload" entry above. If not, "force-reload" is
- # just the same as "restart".
- #
-# echo -n "Restarting $DESC: zabbix_suckerd"
- $0 stop
- $0 start
-# start-stop-daemon --stop --quiet --pidfile \
-# /tmp/$NAME.pid --user zabbix --exec $DAEMON
-# sleep 1
-# start-stop-daemon --start --quiet --pidfile \
-# /tmp/$NAME.pid --user zabbix --exec $DAEMON
-# echo "$NAME."
- ;;
- *)
- N=/etc/init.d/$NAME
- # echo "Usage: $N {start|stop|restart|force-reload}" >&2
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0