diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-08-08 01:13:47 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-08-08 01:13:47 -0400 |
commit | 68f4cd016d0eb6b6440a8b4426d5d363a21f4c20 (patch) | |
tree | 05fca370b1c676bb3afcc3d06f17a90f00e054aa | |
parent | b873b53de1cc0344faa82b6af6394d467c5587ac (diff) | |
download | puppet-tozt-68f4cd016d0eb6b6440a8b4426d5d363a21f4c20.tar.gz puppet-tozt-68f4cd016d0eb6b6440a8b4426d5d363a21f4c20.zip |
more algo updates
-rwxr-xr-x | bin/algo-config | 15 | ||||
-rwxr-xr-x | bin/helpers/launch-algo | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/bin/algo-config b/bin/algo-config index dcd53e5..832577d 100755 --- a/bin/algo-config +++ b/bin/algo-config @@ -16,45 +16,50 @@ if [ -z "${VIRTUAL_ENV:-}" ]; then fi # hush +dns=$(perl -nle 'print $1 if /DNS\s*=\s*(.*),/' "$config_path"/hush.conf) sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/hush.conf cp "$config_path"/hush.conf "$config_path"/hush-not-captive.conf sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/hush.conf -sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/hush-not-captive.conf +sed -i "s|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, $dns/32|" "$config_path"/hush-not-captive.conf sudo cp "$config_path"/hush.conf /etc/wireguard/algo-captive.conf sudo cp "$config_path"/hush-not-captive.conf /etc/wireguard/algo.conf # tozt +dns=$(perl -nle 'print $1 if /DNS\s*=\s*(.*),/' "$config_path"/tozt.conf) sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/tozt.conf cp "$config_path"/tozt.conf "$config_path"/tozt-not-captive.conf sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/tozt.conf -sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/tozt-not-captive.conf +sed -i "s|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, $dns/32|" "$config_path"/tozt-not-captive.conf scp "$config_path"/tozt-not-captive.conf root@tozt.net:/etc/wireguard/algo.conf cp "$config_path"/tozt-not-captive.conf /mnt/puppet/tozt/wireguard $secrets_bin sync tozt # partofme +dns=$(perl -nle 'print $1 if /DNS\s*=\s*(.*),/' "$config_path"/partofme.conf) sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/partofme.conf cp "$config_path"/partofme.conf "$config_path"/partofme-not-captive.conf sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/partofme.conf -sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/partofme-not-captive.conf +sed -i "s|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|" "$config_path"/partofme-not-captive.conf scp "$config_path"/partofme-not-captive.conf root@partofme:/etc/wireguard/algo.conf cp "$config_path"/partofme-not-captive.conf /mnt/puppet/partofme/wireguard $secrets_bin sync partofme # mail +dns=$(perl -nle 'print $1 if /DNS\s*=\s*(.*),/' "$config_path"/mail.conf) 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 +sed -i "s|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, $dns/32|" "$config_path"/mail-not-captive.conf scp "$config_path"/mail-not-captive.conf root@mail.tozt.net:/etc/wireguard/algo.conf cp "$config_path"/mail-not-captive.conf /mnt/puppet/mail/wireguard $secrets_bin sync mail # phone +dns=$(perl -nle 'print $1 if /DNS\s*=\s*(.*),/' "$config_path"/phone.conf) sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/phone.conf cp "$config_path"/phone.conf "$config_path"/phone-not-captive.conf sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/phone.conf -sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/phone-not-captive.conf +sed -i "s|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|" "$config_path"/phone-not-captive.conf echo "algo-captive" segno --scale=5 --output="$config_path"/phone.png "$(cat "$config_path"/phone.conf)" sxiv "$config_path/phone.png" diff --git a/bin/helpers/launch-algo b/bin/helpers/launch-algo index 16eca6c..748d00e 100755 --- a/bin/helpers/launch-algo +++ b/bin/helpers/launch-algo @@ -44,6 +44,8 @@ ansible-playbook main.yml -e " server_name=algo region=nyc3 do_token=$do_token + dns_adblocking=false + ssh_tunneling=false " >> "$logfile" "${script_path}/../algo-config" |