#!/bin/bash

CommServerPath=/opt/remotenas/CommServer
RemoteNASUser=remotenas

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
