tazpanel rev 438

tazpanel: extended usage help; add restart command.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Apr 07 03:50:06 2015 +0300 (2015-04-07)
parents b0146d791379
children 9aeb8fa5beaa
files tazpanel
line diff
     1.1 --- a/tazpanel	Tue Apr 07 00:27:17 2015 +0300
     1.2 +++ b/tazpanel	Tue Apr 07 03:50:06 2015 +0300
     1.3 @@ -34,9 +34,20 @@
     1.4  
     1.5  case "$1" in
     1.6  	-h|*help|*usage)
     1.7 -		echo
     1.8 -		gettext 'Usage: tazpanel [start|stop|passwd|app]'; echo
     1.9 -		echo ;;
    1.10 +		cat <<EOT
    1.11 +Usage: tazpanel [command]
    1.12 +
    1.13 +Commands:
    1.14 +  start    Start tazpanel daemon
    1.15 +  stop     Stop tazpanel daemon
    1.16 +  restart  Restart tazpanel daemon
    1.17 +  passwd   Changing TazPanel password for root (also, short command -p)
    1.18 +  <app>    Open TazPanel page in the browser, where <app> is one of:
    1.19 +           boot, hardware, help, index, installer, live, network, settings, pkgs
    1.20 +           If <app> is empty, index page will open in the browser.
    1.21 +
    1.22 +EOT
    1.23 +		;;
    1.24  	start)
    1.25  		if [ -f $PIDFILE ]; then
    1.26  			gettext 'TazPanel is already running.'; echo
    1.27 @@ -58,6 +69,8 @@
    1.28  		kill $(pgrep -f TazPanel)
    1.29  		rm -f $PIDFILE
    1.30  		status ;;
    1.31 +	restart)
    1.32 +		tazpanel stop; sleep 1; tazpanel start;;
    1.33  	passwd|-p)
    1.34  		echo
    1.35  		gettext 'Changing password for TazPanel'; echo