3 VERSION="`basename $0` ver. 0.91"
4 USAGE="Usage: `basename $0` < option > | --status-all | \
5 [ service_name [ command | --full-restart ] ]"
7 if [ -d /etc/rc.d/init.d ]; then
8 SERVICEDIR="/etc/rc.d/init.d"
10 SERVICEDIR="/etc/init.d"
26 echo $"${VERSION}" >&2
30 if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then
34 functions | halt | killall | single| linuxconf| kudzu | \
35 *rpmorig | *rpmnew | *rpmsave | *~ | *.orig)
38 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
39 "${SERVICEDIR}/${SERVICE}" status
45 elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then
48 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
49 "${SERVICEDIR}/${SERVICE}" stop
50 "${SERVICEDIR}/${SERVICE}" start
53 elif [ -z "${SERVICE}" ]; then
56 OPTIONS="${OPTIONS} ${1}"
63 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
64 "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
66 echo "${SERVICE}: unrecognized service" >&2