2 # Start/stop the netdata daemon.
6 # Required-Start: $remote_fs
7 # Required-Stop: $remote_fs
8 # Should-Start: $network
9 # Should-Stop: $network
10 # Default-Start: 2 3 4 5
12 # Short-Description: Real-time charts for system monitoring
13 # Description: Netdata is a daemon that collects data in realtime (per second)
14 # and presents a web site to view and analyze them. The presentation
15 # is also real-time and full of interactive charts that precisely
16 # render all collected values.
19 PATH=/bin:/usr/bin:/sbin:/usr/sbin
22 DAEMON=/usr/sbin/netdata
23 PIDFILE=/var/run/netdata/netdata.pid
24 SCRIPTNAME=/etc/init.d/"$NAME"
26 test -f $DAEMON || exit 0
28 . /lib/lsb/init-functions
30 [ -r /etc/default/netdata ] && . /etc/default/netdata
33 start) log_daemon_msg "Starting real-time system monitoring" "netdata"
34 start_daemon -p $PIDFILE $DAEMON $EXTRA_OPTS
37 stop) log_daemon_msg "Stopping real-time system monitoring" "netdata"
38 killproc -p $PIDFILE $DAEMON
40 [ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE
42 # wait for plugins to exit
45 restart|force-reload) log_daemon_msg "Restarting real-time system monitoring" "netdata"
50 status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
52 *) log_action_msg "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}"