# Include file for service startup scripts # To use this, set the appropriate variables, then do ". /etc/svc.sh". # For example: # #!/bin/sh # NAME="automount" # SSDFLAGS="-x `which automount` -- /5g file /etc/auto.5g" # . /etc/startup/svc.sh user=${SSDUSER:-root} if [ "$1" = "start" ] ; then echo -n "Starting $NAME... " setuidgid $user start-stop-daemon -S $SSDFLAGS && echo "OK" || echo "failed" elif [ "$1" = "stop" ] ; then echo -n "Stopping $NAME... " setuidgid $user start-stop-daemon -K $SSDFLAGS && echo "OK" || echo "failed" elif [ "$1" = "hup" ] ; then echo -n "Sending SIGHUP to $NAME... " setuidgid $user start-stop-daemon -s 1 -K $SSDFLAGS && echo "OK" || echo "failed" elif [ "$1" = "restart" ] ; then $0 stop $0 start fi