Working cross-compile

This commit is contained in:
notplants 2022-01-11 16:58:10 -05:00
parent 9df741b040
commit 44c7978812
5 changed files with 4 additions and 10 deletions

View File

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

Binary file not shown.

View File

@ -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
peach-dyndns ALL=(ALL) NOPASSWD: /usr/bin/reloadbind

View File

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

View File

@ -119,7 +119,7 @@ pub fn generate_zone(full_domain: &str) -> Result<String, PeachDynDnsError> {
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