home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
scohelp
/
root.2
/
etc
/
scohelphttp
/
scohelphttp~
Wrap
Text File
|
1998-08-19
|
2KB
|
89 lines
:
# @(#) scohelphttp 15.5 98/03/03
#
# This script is used to control scohelphttp
#
# usage: scohelphttp [start|stop|enable|disable|query|restart|rotate]
#
# start
# Starts scohelphttp.
# stop
# Stops scohelphttp.
# enable
# Enables automatic startup of scohelphttp at boot up.
# disable
# Disables automatic startup of scohelphttp at boot up.
# query
# query current state of scohelphttp
# restart
# rereads config files without stopping server
# rotate
# archives log files and zero's current logs
#
#
[ -f /usr/lib/scohelp/.utils ] && . /usr/lib/scohelp/.utils
# Usage message
usage () {
echo "usage: scohelphttp [start|stop|restart|enable|disable|query|rotate]"
}
# check for netscape
if [ -n "${SERVER_BIN}" ] && [ ! -x "${SERVER_BIN}" ]
then
echo "No Netscape server is installed for use by SCOHelp. Please install\n\
a Netscape server to enable SCOHelp.\n" >&2
exit 1
fi
#
# Main
#
case $1 in
start)
[ -x $SERVER_DIR/start ] &&
( cd $SERVER_DIR
/bin/su root -c ./start
)
;;
stop)
[ -x $SERVER_DIR/stop ] &&
( cd $SERVER_DIR
/bin/su root -c ./stop
)
;;
enable)
[ -x $SERVER_DIR/enable ] &&
( cd $SERVER_DIR
/bin/su root -c ./enable
)
;;
disable)
[ -x $SERVER_DIR/disable ] &&
( cd $SERVER_DIR
/bin/su root -c ./disable
)
;;
query)
[ -x $SERVER_DIR/query ] &&
( cd $SERVER_DIR
./query
)
;;
rotate)
[ -x $SERVER_DIR/rotate ] &&
( cd $SERVER_DIR
/bin/su root -c ./rotate )
;;
restart)
[ -x $SERVER_DIR/restart ] &&
( cd $SERVER_DIR
/bin/su root -c "./restart")
;;
*)
usage
;;
esac