5 # Required-Start: $local_fs $remote_fs $network $named $time apache2 httpd squid nginx mysql named opensips upsd hostapd postfix lm_sensors
6 # Required-Stop: $local_fs $remote_fs $network $named $time apache2 httpd squid nginx mysql named opensips upsd hostapd postfix lm_sensors
7 # Should-Start: $local_fs $network $named $remote_fs $time $all
8 # Should-Stop: $local_fs $network $named $remote_fs $time $all
9 # Default-Start: 2 3 4 5
11 # Short-Description: Start and stop the netdata real-time monitoring server daemon
12 # Description: Controls the main netdata monitoring server daemon "netdata".
13 # and all its plugins.
18 ${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
21 DAEMON_PATH=@sbindir_POST@
22 PIDFILE=@localstatedir_POST@/run/$DAEMON.pid
23 DAEMONOPTS="-P $PIDFILE"
25 test -x $DAEMON_PATH/$DAEMON || exit 0
27 . /lib/lsb/init-functions
29 # Safeguard (relative paths, core dumps..)
34 log_daemon_msg "Starting real-time performance monitoring" "netdata"
35 start_daemon -p $PIDFILE $DAEMON_PATH/$DAEMON $DAEMONOPTS
42 log_daemon_msg "Stopping real-time performance monitoring" "netdata"
43 killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON
47 if [ $RETVAL -eq 0 ]; then
54 if ! service_status > /dev/null; then
64 status_of_proc -p $PIDFILE $DAEMON_PATH/$DAEMON netdata
95 service_status && exit 0 || exit $?
98 echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"