]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
unbound: Print nicer error message when already running
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Oct 2016 17:55:23 +0000 (18:55 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Oct 2016 17:55:23 +0000 (18:55 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/init.d/unbound

index 6496265cf11c935644f913e7a3ee4b9bfa6a6328..1b2649f20c3b2303c2a85f7b7ca907f3f2498ca3 100644 (file)
@@ -181,6 +181,12 @@ get_memory_amount() {
 
 case "$1" in
        start)
+               # Print a nicer messagen when unbound is already running
+               if pidofproc -s unbound; then
+                       statusproc /usr/sbin/unbound
+                       exit 0
+               fi
+
                eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
 
                # Create control keys at first run