1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

Update iiab-handle.j2

This commit is contained in:
A Holt 2019-05-11 23:25:51 -04:00 committed by GitHub
parent 041bd22056
commit 3dad45fd5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,17 +1,9 @@
#!/bin/bash #!/bin/bash
echo -e "\n\n\e[41m DEPRECATED PLEASE RUN 'iiab-support' INSTEAD \e[0m\n\n"
echo -e '\n\nDEPRECATED:\n' echo -e 'This older script TEMPORARILY (over)writes /etc/iiab/openvpn_handle to'
echo -e 'identify IIAB to the upstream OpenVPN server, until Ansible next runs.\n'
echo -e 'This interactive script TEMPORARILY (over)writes /etc/iiab/openvpn_handle'
echo -e 'to identify IIAB to the upstream OpenVPN server, until Ansible next runs.\n\n'
echo -e 'PLEASE USE THIS NEW METHOD INSTEAD:\n'
echo -e 'cd /opt/iiab/iiab'
echo -e 'sudo ./install-support\n\n'
#echo -e 'CORRECT METHOD: CHANGE VARIABLE openvpn_handle IN /etc/iiab/local_vars.yml' #echo -e 'CORRECT METHOD: CHANGE VARIABLE openvpn_handle IN /etc/iiab/local_vars.yml'
#echo -e 'THEN RUN "cd /opt/iiab/iiab" THEN "./runrole openvpn"\n' #echo -e 'THEN RUN "cd /opt/iiab/iiab" THEN "./runrole openvpn"\n'
@ -20,7 +12,6 @@ echo -e 'PLEASE NOW TYPE CTRL-C TO QUIT. Or, if you really want it temporary un
read -p 'next time Ansible is run, what OpenVPN handle do you want? ' ans read -p 'next time Ansible is run, what OpenVPN handle do you want? ' ans
echo echo
if [ "$ans" != "" ]; then if [ "$ans" != "" ]; then
echo $ans > /etc/iiab/openvpn_handle echo $ans > /etc/iiab/openvpn_handle
echo -e "\nYour machine's openvpn_handle is TEMPORARILY now set... \n" echo -e "\nYour machine's openvpn_handle is TEMPORARILY now set... \n"
@ -28,7 +19,7 @@ else
echo -e "\nWARNING: your machine's openvpn_handle remains unchanged...\n" echo -e "\nWARNING: your machine's openvpn_handle remains unchanged...\n"
fi fi
echo -e "Restarting OpenVPN daemon...\n\n" echo -e "Restarting OpenVPN daemon...\n"
# 2019-05-09: removing /etc/iiab/openvpn_handle (or setting it to "") are both very bad practices # 2019-05-09: removing /etc/iiab/openvpn_handle (or setting it to "") are both very bad practices
#if [ "$ans" == "" ]; then #if [ "$ans" == "" ]; then
@ -39,7 +30,6 @@ echo -e "Restarting OpenVPN daemon...\n\n"
# echo $ans > /etc/iiab/openvpn_handle # echo $ans > /etc/iiab/openvpn_handle
#fi #fi
{{ systemctl_program }} restart openvpn@xscenet {{ systemctl_program }} restart openvpn@xscenet
# This would also work: (but would bounce all VPN connections, if others exist, causing unnec disruption if so) # This would also work: (but would bounce all VPN connections, if others exist, causing unnec disruption if so)
#{{ systemctl_program }} restart openvpn #{{ systemctl_program }} restart openvpn