1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/openvpn/templates/iiab-handle.j2

19 lines
611 B
Text
Raw Normal View History

2017-05-27 18:09:50 +00:00
#!/bin/bash
2018-08-15 19:33:02 +00:00
# Interactive script (over)writes /etc/iiab/openvpn_handle file, identifying client to server
2018-08-15 19:27:46 +00:00
2018-08-15 21:05:51 +00:00
echo -e '\nCORRECT METHOD: CHANGE VARIABLE openvpn_handle IN /etc/iiab/local_vars.yml'
2018-08-15 19:27:46 +00:00
echo -e 'THEN RUN "cd /opt/iiab/iiab" THEN "./runrole openvpn"\n'
2018-08-15 21:12:17 +00:00
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
2018-08-15 21:05:51 +00:00
echo
2017-05-27 18:09:50 +00:00
if [ "$ans" == "" ]; then
2018-08-15 19:27:46 +00:00
if [ -f /etc/iiab/openvpn_handle ]; then
rm -f /etc/iiab/openvpn_handle
fi
2017-05-27 18:09:50 +00:00
else
2018-08-15 19:27:46 +00:00
echo $ans > /etc/iiab/openvpn_handle
2017-05-27 18:09:50 +00:00
fi
{{ systemctl_program }} restart openvpn@xscenet