X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=conf%2Fprometheus.init;h=59a1322bd425b0a71cf4e2c479f95765148f9ece;hp=c0f8170deaf7d20e77443b26596c180dd7e46342;hb=ec04fc0f482c16e1dc4845ee1ba469b89a387582;hpb=4b4d98e15b75f4e193e4ad52038d6b8b7fafc4f6 diff --git a/conf/prometheus.init b/conf/prometheus.init index c0f8170..59a1322 100644 --- a/conf/prometheus.init +++ b/conf/prometheus.init @@ -1,5 +1,21 @@ #!/bin/sh -EXEFILE=/usr/sbin/prometheus +EXEFILE=`which prometheus` +DEFAULT=/etc/default/prometheus + +if [ -e $DEFAULT ]; then + . $DEFAULT + + case "$PROMETHEUS_ENABLE" in + [Nn]*) + echo "Prometheus disabled in /etc/default/prometheus !" + exit 0 + ;; + esac + +else + echo "File /etc/default/prometheus not found !" + exit 0 +fi case "$1" in start)