diff --git a/awg_config.sh b/awg_config.sh index bf1abb2..6f02f7e 100644 --- a/awg_config.sh +++ b/awg_config.sh @@ -133,6 +133,20 @@ else fi fi +DIR="/etc/config" +DIR_BACKUP="/root/backup2" +config_files="network +firewall" + +if [ ! -d "$DIR_BACKUP" ] +then + echo "Backup files..." + mkdir -p $DIR_BACKUP + for file in $config_files + do + cp -f "$DIR/$file" "$DIR_BACKUP/$file" + done +fi #запрос конфигурации WARP result=$(curl 'https://warp.llimonix.pw/api/warp' \