]> arthur.barton.de Git - netdata.git/commitdiff
updated dynamic dependencies
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 30 Jan 2016 13:24:04 +0000 (15:24 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 30 Jan 2016 13:24:04 +0000 (15:24 +0200)
system/netdata-openrc

index 70d4da1579e18311ebc65aaaf46ec84b12a174fc..202db64c0b97e4f5f0183d506922c40593691d9f 100755 (executable)
@@ -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() {