diff options
author | 2016-09-14 15:00:54 +0800 | |
---|---|---|
committer | 2016-09-14 15:00:54 +0800 | |
commit | d089cf2631c2d647b97977bff905a2bdbff93986 (patch) | |
tree | 50bc400d59665099b1c137c009ac6a77c3e88b13 /servicegateway/deployment/src/main/release/bin/stop.sh | |
parent | fd3c0d4674628bdb922984838803dbac5161e400 (diff) |
upload the servicegateway code .
Change-Id: I3fa83416412e9ef282bd03f45e011133965367c5
Signed-off-by: jiaxiangli <jiaxiangli@huawei.com>
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 |