#!/bin/bash if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi read -p "请输入VPN编号:" NUM cp ./sd$NUM/* /etc/openvpn/ read -p "是否需要导入镜像(yes/no, default is no):" FLASH_SELECT if [ -z "${FLASH_SELECT}" ];then FLASH_SELECT="no" fi if [ "${FLASH_SELECT}" == "yes" ];then cd ~/ if [ ! -f pack.tar.gz ]; then echo "No file found" exit fi tar -zxvf pack.tar.gz cd ~/pack/ Folder_A="." for file_a in ${Folder_A}/* do echo "load $file_a" docker load -i $file_a done fi