stages/*: change license to Apache 2.0
[dragora.git] / archive / socklog / rc.main
blob8f5b19f5127f9d6315c8641972cbc336c4b91b01
1 #! /bin/sh -
3 # socklog/rc.main
5 # Unix domain datagram socket for listening on /dev/log
8 # Redirects the standard error to the standard output
9 exec 2>&1
11 TARGET="$1"
12 SVNAME="${2:-socklog}"
14 start()
16 echo "*** ${SVNAME}: Starting socklog ..."
17 exec /usr/sbin/socklog unix /dev/log
20 reset()
22 case $3 in
23 exit)
24 echo "*** ${SVNAME}: Exited status $4"
26 signal)
27 echo "*** ${SVNAME}: Killed on signal $5"
30 echo "*** ${SVNAME}: Stopped (${3})"
32 esac
35 # Branch to target
36 eval ${TARGET} "$@"