#!/bin/sh
#
# securityservice      Bring up/down securityservice
#
# description: Activates/Deactivates securityservice to \
#              start at boot time.
#
### BEGIN INIT INFO
# Provides: $securityservice
# Should-Start: securityservice
# Short-Description: Bring up/down securityservice
# Description: Bring up/down securityservice
### END INIT INFO

processname=securityservice
options='-d /opt/security/'
user=u_securityservice
process_dir=/usr/bin

# Sanity checks.
if [ ! -x $process_dir/$processname ]; then 
    echo $"$processname isn't installed"
    exit 0
fi

RETVAL=0

. /etc/rc.d/init.d/functions 

# See how we were called.
case "$1" in
  start)
    start $process_dir/$processname $user $options 
    RETVAL=$?
    ;;
  stop)
    stop $process_dir/$processname
    RETVAL=$?
    ;;
  status)
    check_status $processname 0
    RETVAL=$?
    ;;
  restart|reload|force-reload)
    cd "$CWD"
    $0 stop
    $0 start
    RETVAL=$?
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
    exit 2
esac
exit $RETVAL

