1 description "start/stop/control collectd"
3 # Upstart is the replacement init system used in Debian, Ubuntu,
4 # and in Fedora. Refer to http://upstart.ubuntu.com/cookbook/
6 # Normally this file will live as `/etc/init/collectd.conf`
8 usage "initctl <start|stop> collectd"
9 author "Dave Cottlehuber <dch@jsonified.com>"
12 # There are a number of alternative start sequences however
13 # most of those do not work on all Ubuntu flavours and releases.
14 start on started networking and filesystem
15 stop on runlevel [!2345]
17 # collectd itself will run with reduced privileges, but not
18 # all plugins will. Test and edit as required.
19 # An alternative configuration is as a user script in ~/.init/ however
20 # these cannot be started at boot time by the system without
21 # arcane trickery. Also a root user will not see these tasks/jobs
22 # by default. set*id is a reasonable and secure compromise.
23 # These options are not supported on early upstart versions.
27 # Other parameters such as the path to the configuration file
28 # will have been compiled into the binary. These are trivially
29 # added as environment variables below, and then into both
30 # `pre-start` command check before collectd runs, and subsequent
31 # `exec` command parameters below. Remember that upstart runs all
32 # shell commands via `sh -e`.
33 env DAEMON=/usr/sbin/collectd
35 # Tell upstart to wait for collectd to SIGSTOP itself, signaling it is ready
36 # to run. Warning: this only works with collectd 5.5 and newer. You'll have to
37 # use "expect fork" instead, if using collectd 5.4 and older.
40 # prevent thrashing - 10 restarts in 5 seconds
44 # Uncomment to make a log available in /var/log/upstart/collectd.log
45 # (not supported on early upstart versions).
48 # The daemon will not start if the configuration is invalid.
49 pre-start exec $DAEMON -t