mirror of
				https://github.com/Ascend/ascend-docker-runtime.git
				synced 2025-10-31 16:46:22 +08:00 
			
		
		
		
	Match-id-0a51bca7530c8791f9cd6c6b9abb330ef962a99a
This commit is contained in:
		
							
								
								
									
										36
									
								
								build/scripts/uninstall.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								build/scripts/uninstall.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| #!/bin/bash | ||||
| # Copyright (c) Huawei Technologies Co., Ltd. 2020-2022. All rights reserved. | ||||
| # Description: ascend-docker-runtime uninstall script | ||||
| 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}" | ||||
| ASCEND_RUNTIME_CONFIG_DIR=/etc/ascend-docker-runtime.d | ||||
|  | ||||
| if [ ! -f "${DST}" ]; then | ||||
|     exit 0 | ||||
| fi | ||||
|  | ||||
| ${ROOT}/ascend-docker-plugin-install-helper rm ${DST} ${SRC} | ||||
| if [ "$?" != "0" ]; then | ||||
|     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
	 BianTanggui
					BianTanggui