dev_1.0.0_yuyr 完成 log和bind模块开发部署测试 (#8)
- [x] 完成log模块镜像构建、本地端到端写日志——收集——查询流程; - [x] 完成bind模块构建; - [x] 内置域名IP自动更新脚本,使用 /private/argus/etc目录下文件进行同步,容器启动时自动写IP,定时任务刷新更新DNS服务器IP和DNS规则; Co-authored-by: root <root@curious.host.com> Reviewed-on: #8 Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn>
This commit was merged in pull request #8.
This commit is contained in:
27
src/bind/build/reload-bind9.sh
Normal file
27
src/bind/build/reload-bind9.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Reloading BIND9 configuration..."
|
||||
|
||||
# Check if configuration files are valid
|
||||
echo "Checking named.conf.local syntax..."
|
||||
if ! named-checkconf /etc/bind/named.conf.local; then
|
||||
echo "ERROR: named.conf.local has syntax errors!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking zone file syntax..."
|
||||
if ! named-checkzone argus.com /etc/bind/db.argus.com; then
|
||||
echo "ERROR: db.argus.com has syntax errors!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Reload BIND9 via supervisor
|
||||
echo "Reloading BIND9 service..."
|
||||
supervisorctl restart bind9
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BIND9 reloaded successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to reload BIND9!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user