diff options
Diffstat (limited to 'servicegateway/deployment/src/main/release/bin/stop.sh')
-rw-r--r-- | servicegateway/deployment/src/main/release/bin/stop.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/servicegateway/deployment/src/main/release/bin/stop.sh b/servicegateway/deployment/src/main/release/bin/stop.sh new file mode 100644 index 00000000..9ac855f0 --- /dev/null +++ b/servicegateway/deployment/src/main/release/bin/stop.sh @@ -0,0 +1,15 @@ +#!/bin/bash +#check user +CUR_PATH=$(cd `dirname $0`;pwd) +SCRIPT_PATH=$0 +IPMC_USER="`stat -c '%U' ${SCRIPT_PATH}`" +export IPMC_USER +CURRENT_USER="`/usr/bin/id -u -n`" +if [ "${IPMC_USER}" != "${CURRENT_USER}" ] +then + echo "only ${IPMC_USER} can execute this script." + exit 1 +fi +kill -9 $PID + +result=0;$CUR_PATH/../../../../manager/agent/tools/shscript/syslogutils.sh "$(basename $0)" "$result" "Execute($#):$CUR_PATH/$0 $@";exit $result |