summaryrefslogtreecommitdiffstats
path: root/misc/init.d/debian/zabbix-server
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/zabbix-server
parentfb8127285b3156270151079a29825130cf85d524 (diff)
- 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/zabbix-server')
-rwxr-xr-xmisc/init.d/debian/zabbix-server52
1 files changed, 52 insertions, 0 deletions
diff --git a/misc/init.d/debian/zabbix-server b/misc/init.d/debian/zabbix-server
new file mode 100755
index 00000000..367dc3bc
--- /dev/null
+++ b/misc/init.d/debian/zabbix-server
@@ -0,0 +1,52 @@
+#! /bin/sh
+#
+# Zabbix daemon start/stop script.
+#
+# 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/${NAME}
+DESC="Zabbix server daemon"
+PID=/var/tmp/$NAME.pid
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo "Starting $DESC: $NAME"
+ start-stop-daemon --oknodo --start --pidfile $PID \
+ --exec $DAEMON
+ ;;
+ stop)
+ echo "Stopping $DESC: $NAME"
+ start-stop-daemon --oknodo --stop --pidfile $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_server"
+ $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