2025-04-06 16:58:05 +08:00

19 lines
601 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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 "-----------------"