comparison contrib/dashboardctl @ 39:c3955e5cf3b3

Improve stop functions
author Gernot Schulz <gernot@intevation.de>
date Tue, 20 Oct 2015 11:27:21 +0200
parents 3fc74bcbd2cf
children
comparison
equal deleted inserted replaced
38:3fc74bcbd2cf 39:c3955e5cf3b3
38 echo $! > $BOTTLEDASH_PID 38 echo $! > $BOTTLEDASH_PID
39 sleep 10 39 sleep 10
40 } 40 }
41 41
42 stop_bottledash () { 42 stop_bottledash () {
43 kill $(cat $BOTTLEDASH_PID) 43 if [ -f "$BOTTLEDASH_PID" ]; then
44 kill $(cat "$BOTTLEDASH_PID") && rm "$BOTTLEDASH_PID"
45 fi
44 } 46 }
45 47
46 start_chromium () { 48 start_chromium () {
47 # taken from show-dashboard 49 # taken from show-dashboard
48 rm -R $HOME/.cache/chromium/Default/Cache/ 50 rm -R $HOME/.cache/chromium/Default/Cache/
51 echo $! > $CHROMIUM_PID 53 echo $! > $CHROMIUM_PID
52 } 54 }
53 55
54 56
55 stop_chromium () { 57 stop_chromium () {
56 kill $(cat $CHROMIUM_PID) 58 if [ -f "$CHROMIUM_PID" ]; then
59 kill $(cat "$CHROMIUM_PID") && rm "$CHROMIUM_PID"
60 fi
57 } 61 }
58 62
59 xdo_reload_chromium () { 63 xdo_reload_chromium () {
60 # Start Chromium if necessary 64 # Start Chromium if necessary
61 if [ -f "$BOTTLEDASH_PID" ] && [ -d /proc/$(cat "$CHROMIUM_PID") ]; then 65 if [ -f "$BOTTLEDASH_PID" ] && [ -d /proc/$(cat "$CHROMIUM_PID") ]; then
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)