add hole vpn to automatically start
authorIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 19:58:30 +0000 (15:58 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 20 Oct 2020 19:58:30 +0000 (15:58 -0400)
primary-setup

index 4c7aeccf606c6c9f262fbf56002531fbae5c5b9c..4011838a59a89727ae41e56374ce70dceed761ee 100755 (executable)
@@ -66,6 +66,14 @@ if dpkg -s radicale &>/dev/null; then
   fi
 fi
 
+if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+  m sudo systemctl start openvpn-client@hole
+  m sudo systemctl enable openvpn-client@hole
+else
+  m sudo systemctl stop openvpn-client@hole
+  m sudo systemctl disable openvpn-client@hole
+fi
+
 m /a/exe/mail-setup
 exit 0
 :