1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/openvpn/templates/iiab-handle.j2
2018-09-05 11:34:31 -04:00

20 lines
775 B
Django/Jinja
Executable file

#!/bin/bash
# DEPRECATED interactive script (over)writes /etc/iiab/openvpn_handle file, identifying client to server
echo -e '\nCORRECT 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 "Or, for a temporary solution until the next time Ansible is run,"
read -p "what OpenVPN handle do you want to use? " ans
echo
if [ "$ans" == "" ]; then
if [ -f /etc/iiab/openvpn_handle ]; then
rm -f /etc/iiab/openvpn_handle
fi
else
echo $ans > /etc/iiab/openvpn_handle
fi
{{ systemctl_program }} restart openvpn@xscenet
# This would also work: (but would bounce all VPN connections, if others exist, causing unnec disruption if so)
#{{ systemctl_program }} restart openvpn