diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-01-30 15:24:04 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-01-30 15:24:04 +0200 |
commit | 608b57a57c9e8ce887e0b57ae1186c67c1336730 (patch) | |
tree | 9f9735bcb3869c3fa96060953ef3c76c6caf8500 /system | |
parent | f0e9e57ed96efadfe99389d4ad435e10b26b3213 (diff) |
updated dynamic dependencies
Diffstat (limited to 'system')
-rwxr-xr-x | system/netdata-openrc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/system/netdata-openrc b/system/netdata-openrc index 70d4da1579..202db64c0b 100755 --- a/system/netdata-openrc +++ b/system/netdata-openrc @@ -21,6 +21,9 @@ NETDATA_WAIT_EXIT_TIMEOUT=${NETDATA_WAIT_EXIT_TIMEOUT-15} # to exit. NETDATA_FORCE_EXIT=${NETDATA_FORCE_EXIT-0} +# Netdata will use these services, only if they +# are enabled to start. +NETDATA_START_AFTER_SERVICES="${NETDATA_START_AFTER_SERVICES-apache2 squid nginx mysql named opensips upsd hostapd postfix lm_sensors}" extra_started_commands="getconf" pidfile="/var/run/netdata/netdata.pid" @@ -31,9 +34,14 @@ depend() { use logger need net - # FIXME - # We should depend on these only if they are enabled: - # apache, squid, nginx, mysql, named, opensips, nut, hostapd, postfix, lm-sensors + local x + for x in ${NETDATA_START_AFTER_SERVICES} + do + if [ -f /etc/runlevels/default/${x} ] + then + use ${x} + fi + done } start() { |