添加一键更新脚本

This commit is contained in:
fengbh 2025-04-06 16:58:05 +08:00
parent c87cd667bb
commit 1f681e62bd

View File

@ -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 "-----------------"