tazpanel view tazpanel @ rev 44

Add a loading mechanism for page that take long to be generated
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 08 01:17:37 2011 +0200 (2011-04-08)
parents 2ea20065417a
children cf15cb2ff715
line source
1 #!/bin/sh
2 #
3 # Tiny Tazpanel cmdline interface
4 #
6 VERSION=1.0
8 # Get the configuration file and functions
9 CONFIG="/etc/slitaz/tazpanel.conf"
10 [ -f $CONFIG ] && . $CONFIG
11 [ -f tazpanel.conf ] && . tazpanel.conf
12 [ ! -f $PANEL/lib/libtazpanel ] && \
13 echo "No config file or libtazpanel found: $CONFIG" && exit 1
14 . $PANEL/lib/libtazpanel
15 . /usr/lib/slitaz/libtaz
16 source_lib commons
18 # Include gettext helper script.
19 . /usr/bin/gettext.sh
21 # Export package name for gettext.
22 TEXTDOMAIN='tazpanel'
23 export TEXTDOMAIN
25 #
26 # Commands
27 #
29 case "$1" in
30 start)
31 gettext "Starting TazPanel web server on port $HTTPD_PORT..."
32 httpd -p $HTTPD_PORT -u root -c $HTTPD_CONF \
33 -r "`gettext \"TazPanel Authentication\"`" &
34 status ;;
35 stop)
36 gettext "Stopping TazPanel web server..."
37 killall httpd && status ;;
38 passwd|-p)
39 echo ""
40 gettext "Changing password for TazPanel"
41 gettext "New password: " && read pass
42 sed -i s"/\/:root:.*/\/:root:$pass/" $HTTPD_CONF
43 gettext "Password changed succeffuly"; echo
44 echo "" ;;
45 *)
46 echo ""
47 gettext "Usage:" && echo "`basename $0` [start|stop|passwd]"; echo
48 echo "" ;;
49 esac
51 exit 0