mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-27 06:10:23 +08:00
Match-id-09d231c28d847d67cae19bf13995f9cc1a22356c
This commit is contained in:
@@ -34,6 +34,7 @@ function install()
|
||||
rm -rf ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
fi
|
||||
mkdir -p ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
chmod 750 ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
cp -f ./base.list ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
chmod 440 ${ASCEND_RUNTIME_CONFIG_DIR}/base.list
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
|
||||
# Description: ascend-docker-runtime 卸载脚本
|
||||
set -e
|
||||
|
||||
LOG_FILE="/var/log/ascend_seclog/ascend_toolbox_install.log"
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "start uninstall"
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "start uninstall" >>${LOG_FILE}
|
||||
ROOT=$(cd $(dirname $0); pwd)/..
|
||||
DST='/etc/docker/daemon.json'
|
||||
SRC="${DST}.${PPID}"
|
||||
@@ -14,10 +16,21 @@ fi
|
||||
|
||||
${ROOT}/ascend-docker-plugin-install-helper rm ${DST} ${SRC}
|
||||
if [ "$?" != "0" ]; then
|
||||
echo 'ERROR: del damon.json failed'
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "ERROR: del damon.json failed"
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "ERROR: del damon.json failed" >>${LOG_FILE}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv ${SRC} ${DST}
|
||||
|
||||
[ -n "${ASCEND_RUNTIME_CONFIG_DIR}" ] && rm -rf ${ASCEND_RUNTIME_CONFIG_DIR}
|
||||
INSTALL_ROOT_PATH=$(dirname $(dirname ${ROOT}))
|
||||
|
||||
if test -d ${INSTALL_ROOT_PATH}
|
||||
then
|
||||
rm -rf ${INSTALL_ROOT_PATH}
|
||||
echo "Ascend-Docker-Runtime $(date +%Y%m%d-%H:%M:%S) delete ${INSTALL_ROOT_PATH} succesfull"
|
||||
echo "Ascend-Docker-Runtime $(date +%Y%m%d-%H:%M:%S) delete ${INSTALL_ROOT_PATH} succesfull" >>${LOG_FILE}
|
||||
fi
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "uninstall successfully"
|
||||
echo "Ascend-Docker-Runtime" $(date +%Y%m%d-%H:%M:%S) "uninstall successfully" >>${LOG_FILE}
|
||||
Reference in New Issue
Block a user