#!/bin/sh
LOCAL_SC='/usr/local/etc/rc.d/'
SYS_SC='/etc/rc.d/'
if [ $# -lt 2 ]
then
echo "USE:"
echo "$0 servicename start|restart|stop"
exit 3
fi
#Most of start/stop commands I issued are in LOCAL_SC
if [ -x $LOCAL_SC$1 ]
then
$LOCAL_SC$1 $2
exit 0
else
#Look in the system scripts
if [ -x $SYS_SC$1 ]
then
$SYS_SC$1 $2
exit 0
fi
fi
echo "$1 - not found"
exit 3
em /usr/local/sbin/service
Nenhum comentário:
Postar um comentário