From ba115c88c5f93561b6f521d6dc232c7c6d85801b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 19 Feb 2019 02:27:37 -0500 Subject: distribute algo secrets to mail --- bin/algo-config | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/algo-config b/bin/algo-config index db8790c..ca414b9 100755 --- a/bin/algo-config +++ b/bin/algo-config @@ -42,14 +42,13 @@ cp "$config_path"/partofme-not-captive.conf /mnt/puppet/partofme/wireguard $secrets_bin sync partofme # mail -# XXX -# sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/mail.conf -# cp "$config_path"/mail.conf "$config_path"/mail-not-captive.conf -# sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/mail.conf -# sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/mail-not-captive.conf -# scp "$config_path"/mail-not-captive.conf root@newsmtp.tozt.net:/etc/wireguard/algo.conf -# cp "$config_path"/mail-not-captive.conf /mnt/puppet/mail/wireguard -# $secrets_bin sync mail +sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/mail.conf +cp "$config_path"/mail.conf "$config_path"/mail-not-captive.conf +sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/mail.conf +sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/mail-not-captive.conf +scp "$config_path"/mail-not-captive.conf root@newsmtp.tozt.net:/etc/wireguard/algo.conf +cp "$config_path"/mail-not-captive.conf /mnt/puppet/mail/wireguard +$secrets_bin sync mail # phone sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/phone.conf -- cgit v1.2.3-54-g00ecf