#!/bin/bash
# Manages CommServer application
###
# chkconfig: 23 98 55
# description: Starts and stops CommServer - part of remote-nas
###

CommServerPath=/opt/remotenas/CommServer
RemoteNASUser=remotenas
export http_proxy=""

cd $CommServerPath

case "$1" in
	start)
		su $RemoteNASUser -c "./startup.sh"
		;;
	stop)
		su $RemoteNASUser -c "./shutdown.sh"
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo "usage: $0 [start|stop|restart]"
		;;
esac
