#!/bin/bash
#
# aws-start     This shell script takes care of starting and stopping
#               an astro-wise server and must be run as root!
#
# chkconfig:    345 92 12
# description:  Astro-wise server starter
#
# probe:        true
#
# notes:        The user account which operate the service should have in its
#               $HOME/bin directory a script which with options 'start'
#               starts the service, with option 'stop' stops the services and
#               with the option 'status' returns the status of the service.
#
# To be filled in:
user=##username which operates the script
name=##name of the script
#
case "$1" in
    start)
        su -l ${user} -c "${name} start"
        sleep 2
        ;;
    stop)
        su -l ${user} -c "${name} stop"
        sleep 2
        ;;
    status)
        su -l ${user} -c "${name} status"
        sleep 2
        ;;
    *)
        echo $"Usage: $0 (start|status|stop)"
        ;;
esac
exit 0
