Initial commit

This commit is contained in:
billz 2019-11-15 09:01:57 +00:00
parent 11955a9641
commit 06c00b727b
1 changed files with 15 additions and 0 deletions

15
installers/configauth.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Updates openvpn client.conf with auth credentials
echo "Enabling auth-user-pass in OpenVPN client.conf..."
line='auth-user-pass'
file='/tmp/ovpnclient.ovpn'
if grep -q "$line" $file; then
echo "Updating line: $line"
sudo sed -i "s/$line/$line login.conf/g" $file
else
echo "Adding line: $line"
sudo sed -i "$ a $line login.conf" $file
fi