仿做了个PTC服务启动脚本
发表于 : 2005-10-09 15:39
仿做了个PTC服务启动脚本(请指导)
#! /bin/sh
# PTC License Server
. /lib/lsb/init-functions
PATH=/bin:/usr/bin:/sbin:/usr/sbin
START=/usr/local/ptc/flexlm/bin/ptcstartserver
STOP=/usr/local/ptc/flexlm/bin/ptcshutdown
test -x $START || exit 0
test -x $STOP || exit 0
case "$1" in
start)
log_begin_msg "Starting PTC License Server..."
$START
echo $?
;;
stop)
log_beginlog_begin_msg_msg "Stopping PTC License Server..."
$STOP
log_begin_msg $?
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
log_begin_msg "Usage: ptcserver.d {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
#! /bin/sh
# PTC License Server
. /lib/lsb/init-functions
PATH=/bin:/usr/bin:/sbin:/usr/sbin
START=/usr/local/ptc/flexlm/bin/ptcstartserver
STOP=/usr/local/ptc/flexlm/bin/ptcshutdown
test -x $START || exit 0
test -x $STOP || exit 0
case "$1" in
start)
log_begin_msg "Starting PTC License Server..."
$START
echo $?
;;
stop)
log_beginlog_begin_msg_msg "Stopping PTC License Server..."
$STOP
log_begin_msg $?
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
log_begin_msg "Usage: ptcserver.d {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0