123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #! /bin/sh -
- #
- # cupsd/rc.main
- #
- # CUPS scheduler.
- #
- # Redirects the standard error to the standard output
- exec 2>&1
- TARGET="$1"
- SVNAME="${2:-cupsd}"
- start()
- {
- echo "*** ${SVNAME}: Starting cupsd ..."
- # Check first if 'dbus' is running before to run 'cupsd'
- perpok dbus || exit $?
- exec /usr/sbin/cupsd -f
- }
- reset()
- {
- case $3 in
- exit)
- echo "*** ${SVNAME}: Exited status $4"
- ;;
- signal)
- echo "*** ${SVNAME}: Killed on signal $5"
- ;;
- *)
- echo "*** ${SVNAME}: Stopped (${3})"
- ;;
- esac
- }
- # Branch to target
- eval ${TARGET} "$@"
|