OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • Hopefully an easy question
« previous next »
  • Print
Pages: [1]

Author Topic: Hopefully an easy question  (Read 2304 times)

guest15389

  • Guest
Hopefully an easy question
« on: August 31, 2017, 03:03:02 pm »
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:


Code: [Select]
-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.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13634
  • Karma: 1174
    • View Profile
Re: Hopefully an easy question
« Reply #1 on: August 31, 2017, 03:08:36 pm »
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
Logged

guest15389

  • Guest
Re: Hopefully an easy question
« Reply #2 on: August 31, 2017, 04:17:10 pm »
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:

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

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13634
  • Karma: 1174
    • View Profile
Re: Hopefully an easy question
« Reply #3 on: August 31, 2017, 04:21:05 pm »
netdata_enable="YES"

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


Cheers,
Franco
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • Hopefully an easy question
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2