Hopefully an easy question

Started by guest15389, August 31, 2017, 03:03:02 PM

Previous topic - Next topic
I'm trying to start netdata on startup and I followed way to drop a shell script in to autostart and I must be missing something super silly:



-rwxr-xr-x   1 root  wheel    88 Aug  4 10:29 99-netdata.start
root@phoenix:/usr/local/etc/rc.syshook.d # cat 99-netdata.start
#!/bin/sh

echo -n "Starting Netdata: "
/usr/local/sbin/netdata -P /var/run/netdata.pid
root@phoenix:/usr/local/etc/rc.syshook.d # /usr/local/sbin/netdata -P /var/run/netdata.pid
root@phoenix:/usr/local/etc/rc.syshook.d # ps aux | grep netdata
root    9582   1.9  1.6  256880 129736  -  SN   08:58   0:00.12 /usr/local/sbin/netdata -P /var/run/netdata.pid
root    9974   0.5  0.0   14784   3056  -  SN   08:58   0:00.06 /usr/local/libexec/netdata/plugins.d/apps.plugin 1
root   18798   0.0  0.0 1080488   2840  0  S+   08:58   0:00.00 grep netdata


If I run the shell script by hand, it starts up no problem.

Can you see the boot message (error)?

You could add "read KEY" to the script as the last line to let it pause until you press a key, or a "sleep 30".


Cheers,
Franco

I wonder if it is I'm not passing a start to it. I removed it and moved it to the other method and that worked fine:


root@phoenix:/etc/rc.conf.d # cat netdata
netdata_enable=YES
netdata_opnsense_bootup_run="/usr/local/sbin/netdata -P /var/run/netdata.pid"

netdata_enable="YES"

...is all you need normally, can also push this to /etc/rc.conf directly, we don't touch it.


Cheers,
Franco