Commit 76677b4b authored by Lorenzo Pivetta's avatar Lorenzo Pivetta

Initial import

parent 701603af
This diff is collapsed.
#!/bin/bash
#
# WARNING! WARNING! WARNING!
#
# Do **NOT** edit this file! Your changes will be overwritten!
export PATH="/sbin:/usr/bin:/bin:/runtime/sbin:/runtime/bin"
HOSTNAME=`hostname`
CONFFILE=/runtime/site/${HOSTNAME}/etc/stopper.conf
ROOT=0
USER=controls
USERID=10000
MYSELF=`basename $0`
stopsrv()
{
uid=`id -u`
if [ ${uid} -ne ${ROOT} -a ${uid} -ne ${USERID} ]; then
echo "ERROR: you should be '${USER}' or 'root' to stop ${SRV}"
else
astorcli $HOSTNAME stop
fi
}
statussrv()
{
astorcli ${HOSTNAME} status
}
#
# main body
#
if [ -f ${CONFFILE} ]; then
. ${CONFFILE}
else
echo "${CONFFILE} not found! Aborting!"
exit 0
fi
case "$1" in
stop)
stopsrv
;;
status)
statussrv
;;
*)
echo "Usage: $0 {stop|status}"
;;
esac
exit 0
# EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment