From 1f681e62bd6ec381681f99ee4e3ec04818bba6b9 Mon Sep 17 00:00:00 2001 From: fengbh <1953356163@qq.com> Date: Sun, 6 Apr 2025 16:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=94=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me241200_zerotierApi/up_nas_conf.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 me241200_zerotierApi/up_nas_conf.sh diff --git a/me241200_zerotierApi/up_nas_conf.sh b/me241200_zerotierApi/up_nas_conf.sh new file mode 100755 index 0000000..5cfc9b2 --- /dev/null +++ b/me241200_zerotierApi/up_nas_conf.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# 更新NAS上的smartdns配置文件,自动重启容器 +source ./env/bin/activate +echo "-----------------" +echo "-- 生成smartdns配置文件--" +echo "-----------------" +python main.py +echo "-----------------" +echo "-- 更新NAS上的smartdns配置文件--" +echo "-----------------" +scp ./smartdns.conf fengbohan@nas.fbh:/volume2/docker/smartdns/smartdns.conf +echo "-----------------" +echo "-- 重启容器--" +echo "-----------------" +ssh -t fengbohan@nas.fbh "sudo /usr/local/bin/docker restart bdbe37609e7c" +echo "-----------------" +echo "-- 更新完成--" +echo "-----------------"