changeset 39:c3955e5cf3b3

Improve stop functions
author Gernot Schulz <gernot@intevation.de>
date Tue, 20 Oct 2015 11:27:21 +0200
parents 3fc74bcbd2cf
children bef9105f2d28
files contrib/dashboardctl
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/dashboardctl	Tue Oct 20 08:24:56 2015 +0200
+++ b/contrib/dashboardctl	Tue Oct 20 11:27:21 2015 +0200
@@ -40,7 +40,9 @@
 }
 
 stop_bottledash () {
-    kill $(cat $BOTTLEDASH_PID)
+    if [ -f "$BOTTLEDASH_PID" ]; then
+        kill $(cat "$BOTTLEDASH_PID") && rm "$BOTTLEDASH_PID"
+    fi
 }
 
 start_chromium () {
@@ -53,7 +55,9 @@
 
 
 stop_chromium () {
-    kill $(cat $CHROMIUM_PID)
+    if [ -f "$CHROMIUM_PID" ]; then
+        kill $(cat "$CHROMIUM_PID") && rm "$CHROMIUM_PID"
+    fi
 }
 
 xdo_reload_chromium () {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)