#!/bin/sh
#
# chkconfig: 345 95 30
# description: Executes "ditty" commands on behalf of the user \
#              typically at system startup time.

# Source dgrp file and dir locations
[ -f /usr/bin/dgrp/config/file_locations ] || exit 0
. /usr/bin/dgrp/config/file_locations

# Check that the ditty command file exists.
[ -f ${DGRP_DITTYCMDS} ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start|restart|reload)
	echo "Running ${DGRP_DITTYCMDS}: "
	exec sh ${DGRP_DITTYCMDS}
	;;
  stop|status)
	RETVAL=0
	;;
  *)
	echo "Usage: $0 {start|stop|restart|reload|status}"
	RETVAL=1
esac

exit $RETVAL
