You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
378 B

#!/bin/bash
CONTAINER_CODE=$1 #容器编号
MOUNT_PATH=/data/mmogrun/
OUT_MOUNT_PATH=${MOUNT_PATH}${CONTAINER_CODE} ##外部挂载目录
#source /data/env.env
# shellcheck disable=SC2164
cd "${OUT_MOUNT_PATH}"
PID=$(cat maintainer.pid)
docker stop "${PID}"
docker rm "${PID}"
rm -rf "${OUT_MOUNT_PATH}"
curl -X POST http://127.0.0.1:8088/server/delete?id=${CONTAINER_CODE}