diff --git a/cross_compile.sh b/cross_compile.sh index 59d5a1c..4bf578d 100755 --- a/cross_compile.sh +++ b/cross_compile.sh @@ -1,2 +1,3 @@ #!/usr/bin/env bash cargo build --release --target=x86_64-unknown-linux-musl +cp target/x86_64-unknown-linux-musl/release/peach-dyndns-server devops/files/peach-dyndns-server diff --git a/devops/files/peach-dyndns-server b/devops/files/peach-dyndns-server index 016e6f9..effa488 100755 Binary files a/devops/files/peach-dyndns-server and b/devops/files/peach-dyndns-server differ diff --git a/devops/templates/bindctl b/devops/templates/bindctl index 498fd05..53273d3 100644 --- a/devops/templates/bindctl +++ b/devops/templates/bindctl @@ -1,12 +1,4 @@ # # Allow peach-dyndns to reload bind as sudo # - -# User alias for bind-ctl which can reload bind -User_Alias BIND_CTRL = peach-dyndns - -# Command alias for reboot and shutdown -Cmnd_Alias RELOADBIND = /usr/bin/reloadbind - -# Allow BIND_CTRL users to execute RELOADBIND command without password -BIND_CTRL ALL=(ALL) NOPASSWD: RELOADBIND \ No newline at end of file +peach-dyndns ALL=(ALL) NOPASSWD: /usr/bin/reloadbind \ No newline at end of file diff --git a/devops/templates/named.conf b/devops/templates/named.conf index 5134e55..139ec37 100644 --- a/devops/templates/named.conf +++ b/devops/templates/named.conf @@ -7,5 +7,6 @@ // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; +include "/etc/bind/dyn.peachcloud.org.keys"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; \ No newline at end of file diff --git a/src/generate_zone.rs b/src/generate_zone.rs index db91eb9..553ffea 100644 --- a/src/generate_zone.rs +++ b/src/generate_zone.rs @@ -119,7 +119,7 @@ pub fn generate_zone(full_domain: &str) -> Result { zone \"{full_domain}\" {{ type master; file \"/var/lib/bind/{full_domain}\"; - allow-update {key "{full_domain}";}; + allow-update {{key \"{full_domain}\";}}; }}; ", full_domain = full_domain