File: zabbix-server-mysql.zabbix-server.init

package info (click to toggle)
zabbix 1%3A1.1.4-10etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,964 kB
  • ctags: 8,876
  • sloc: php: 28,690; ansic: 27,593; sql: 5,639; sh: 4,771; cpp: 4,632; makefile: 340; python: 238
file content (42 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh
### BEGIN INIT INFO
# Provides:          zabbix-server
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:	     0 6
# Short-Description: Start zabbix-server daemon
### END INIT INFO
DAEMON=/usr/sbin/zabbix_server
NAME=zabbix_server
DESC="Zabbix server"
PID=/var/run/zabbix-server/$NAME.pid

test -f $DAEMON || exit 0

set -e

case "$1" in
  start)
    rm -f $PID
	echo "Starting $DESC: $NAME"
	start-stop-daemon --oknodo --start --pidfile $PID \
		--exec $DAEMON  < /dev/null &> /dev/null
	;;
  stop)
	echo "Stopping $DESC: $NAME"
	start-stop-daemon --oknodo --stop --pidfile $PID \
		--exec $DAEMON
	;;
  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