i
This commit is contained in:
20
update.sh
20
update.sh
@@ -62,19 +62,9 @@ if [ ! -s "$TARGET_FILE" ]; then # -s 检查文件非空
|
||||
fi
|
||||
|
||||
# (可选)重启bird服务并检查状态
|
||||
log "尝试重启bird服务"
|
||||
if systemctl restart bird; then
|
||||
log "bird服务重启成功"
|
||||
if systemctl is-active --quiet bird; then
|
||||
log "bird服务运行正常"
|
||||
echo "操作完成,配置已更新且服务正常"
|
||||
else
|
||||
log "错误:bird服务重启后未正常运行,请检查配置"
|
||||
echo "警告:服务未正常运行,请检查日志"
|
||||
fi
|
||||
else
|
||||
log "错误:bird服务重启失败,请手动检查"
|
||||
echo "错误:服务重启失败,请手动处理"
|
||||
fi
|
||||
log "重载bird服务"
|
||||
birdc c
|
||||
log "脚本执行完毕"
|
||||
|
||||
log "脚本执行完毕"
|
||||
cd
|
||||
rm update.sh
|
||||
Reference in New Issue
Block a user