Commit 3c76f187 authored by manoj v's avatar manoj v
Browse files

Issue #240 chore: openvpn script is added

No related merge requests found
Showing with 8 additions and 8 deletions
+8 -8
#!/bin/bash
userPassword=$1
#download the packages
cd /tmp
wget -c http://swupdate.openvpn.org/as/openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#cd /tmp
#wget -c http://swupdate.openvpn.org/as/openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#install the software
sudo dpkg -i openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#sudo dpkg -i openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#update the password for user openvpn
sudo echo "openvpn:$userPassword"|sudo chpasswd
#configure server network settings
PUBLICIP=$(curl -s ifconfig.me)
sudo apt-get install sqlite3
sudo sqlite3 "/usr/local/openvpn_as/etc/db/config.db" "update config set value='$PUBLICIP' where name='host.name';"
#restart OpenVPN AS service
sudo systemctl restart openvpnas
\ No newline at end of file
#PUBLICIP=$(curl -s ifconfig.me)
#sudo apt-get install sqlite3
#sudo sqlite3 "/usr/local/openvpn_as/etc/db/config.db" "update config set value='$PUBLICIP' where name='host.name';"
##restart OpenVPN AS service
#sudo systemctl restart openvpnas
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment