#
# description: Manages all PLC services on this machine
#
-# $Id: host.init,v 1.2 2006/03/27 22:01:36 mlhuang Exp $
+# $Id: host.init,v 1.3 2006/04/07 17:12:52 mlhuang Exp $
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin
[ $ERRORS -eq 0 ] && success $"PLC unmount" || failure $"PLC unmount"
echo
- chroot $PLC_ROOT /sbin/service plc $PLC_OPTIONS start
+ chroot $PLC_ROOT /sbin/service plc $PLC_OPTIONS start $*
check
}
stop ()
{
if mounted $PLC_ROOT ; then
- chroot $PLC_ROOT /sbin/service plc $PLC_OPTIONS stop
+ chroot $PLC_ROOT /sbin/service plc $PLC_OPTIONS stop $*
check
fi
echo
}
-case "$1" in
+# Get command
+shift $(($OPTIND - 1))
+command=$1
+
+# Get step(s)
+shift 1
+
+case "$command" in
start|stop)
- $1
+ $command $*
;;
restart)
- stop
- start
+ stop $*
+ start $*
;;
*)