comparison contrib/dashboardctl @ 36:1e084c23d101

Add --start/--stop commands
author Gernot Schulz <gernot@intevation.de>
date Mon, 19 Oct 2015 13:34:29 +0200
parents 295e3253bb49
children 58ca5b1d33a5
comparison
equal deleted inserted replaced
35:295e3253bb49 36:1e084c23d101
13 usage () { 13 usage () {
14 cat << EOF 14 cat << EOF
15 Usage: $0 [COMMAND] 15 Usage: $0 [COMMAND]
16 16
17 Commands: 17 Commands:
18 --start Start Bottledash and the dashboard/browser
19 --stop Stop Bottledash and the dashboard/browser
20 --reload Restart Bottledash and reload the dashboard/browser
21 --smart-reload If a new DB is available, restart Bottledash and reload
22 the dashboard/browser
18 --restart-bd Restart Bottledash 23 --restart-bd Restart Bottledash
19 --reload-browser Reload dashboard/browser 24 --reload-browser Reload dashboard/browser
20 --reload Restart Bottledash and reload the dashboard/browser
21 --check-db Check if a new DB is available 25 --check-db Check if a new DB is available
22 --smart-reload If a new DB is available, restart Bottledash and reload
23 the dashboard/browser
24 -h, --help This help 26 -h, --help This help
25 EOF 27 EOF
26 } 28 }
27 29
28 start_bottledash () { 30 start_bottledash () {
79 mv "$NEWDB" "$OLDDB" 81 mv "$NEWDB" "$OLDDB"
80 fi 82 fi
81 } 83 }
82 84
83 case $1 in 85 case $1 in
86 '--start')
87 start_bottledash
88 start_chromium
89 ;;
90 '--stop')
91 stop_bottledash
92 stop_chromium
93 ;;
84 '--restart-bd') 94 '--restart-bd')
85 stop_bottledash 95 stop_bottledash
86 start_bottledash 96 start_bottledash
87 ;; 97 ;;
88 '--reload-browser') 98 '--reload-browser')
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)