diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-08-07 19:42:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-08-07 19:42:58 +0000 |
commit | 6907585cf10bf56cc1d1124a6a909956c31e4139 (patch) | |
tree | 887178b034f92ac14aaa953ab4bafa1f488e52c2 /perl-install/standalone/interactive_http/miniserv.init | |
parent | 99d9dfd2992113e3162d7bc259b301a355738c4b (diff) | |
download | drakx-backup-do-not-use-6907585cf10bf56cc1d1124a6a909956c31e4139.tar drakx-backup-do-not-use-6907585cf10bf56cc1d1124a6a909956c31e4139.tar.gz drakx-backup-do-not-use-6907585cf10bf56cc1d1124a6a909956c31e4139.tar.bz2 drakx-backup-do-not-use-6907585cf10bf56cc1d1124a6a909956c31e4139.tar.xz drakx-backup-do-not-use-6907585cf10bf56cc1d1124a6a909956c31e4139.zip |
add interactive_http
Diffstat (limited to 'perl-install/standalone/interactive_http/miniserv.init')
-rw-r--r-- | perl-install/standalone/interactive_http/miniserv.init | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/perl-install/standalone/interactive_http/miniserv.init b/perl-install/standalone/interactive_http/miniserv.init new file mode 100644 index 000000000..39c724dc7 --- /dev/null +++ b/perl-install/standalone/interactive_http/miniserv.init @@ -0,0 +1,51 @@ +#!/bin/sh +# chkconfig: 235 99 00 +# description: Start or stop the miniserv administration server + +name=drakxtools_http +server=/usr/share/libDrakX/$name/miniserv.pl + +case "$1" in +'start') + echo -n "Starting $name: " + perl $server /etc/$name.conf + touch /var/lock/subsys/drakxtools_http + echo $name + ;; +'stop') + echo -n "Shutting down $name: " + kill `cat /var/run/$name.pid` + rm -f /var/lock/subsys/drakxtools_http + echo $name + ;; +'status') + if [ -s /var/run/$name.pid ]; then + pid=`cat /var/run/$name.pid` + kill -0 $pid >/dev/null 2>&1 + if [ "$?" = "0" ]; then + echo "$name (pid $pid) is running" + else + echo "$name is stopped" + fi + else + echo "$name is stopped" + fi + ;; +'restart') + $0 stop + $0 start + ;; +'reload') + $0 stop + $0 start + ;; +'condrestart') + if [ -f /var/lock/subsys/drakxtools_http ]; then + $0 restart + fi + ;; +*) + echo "Usage: $0 {start|stop|restart|status|reload|condrestart}" + ;; +esac +exit 0 |