forked from python-diamond/Diamond
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiamond.upstart
30 lines (25 loc) · 964 Bytes
/
diamond.upstart
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
# diamond - A system statistics collector for graphite
#
# Diamond is a daemon and toolset for gather system statistics
# and publishing them to graphite.
description "Diamond system statistics collector"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on [!12345]
limit nofile 32768 32768
kill timeout 5
script
# Source /etc/diamond if exists. Otherwise defaults.
if [ -f /etc/default/diamond ]; then
. /etc/default/diamond
else
ENABLE_DIAMOND="yes"
DIAMOND_PID="/var/run/diamond.pid"
DIAMOND_USER="diamond"
fi
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=`which diamond`
# Launch Diamond if enabled in /etc/default
if [ "x$ENABLE_DIAMOND" = "xyes" ]; then
exec start-stop-daemon --start --make-pidfile --chuid $DIAMOND_USER --pidfile $DIAMOND_PID --exec $DAEMON -- --foreground --skip-change-user --skip-fork --skip-pidfile
fi
end script