Launch updateFreeVPN start.sh and add it to daily crontab
This commit is contained in:
@@ -56,7 +56,16 @@ then
|
||||
elif [[ "${OPENVPN_PROVIDER^^}" = "FREEVPN" ]]
|
||||
then
|
||||
FREEVPN_DOMAIN=${OPENVPN_CONFIG%%-*}
|
||||
export OPENVPN_PASSWORD=$(curl -s https://freevpn.${FREEVPN_DOMAIN:-"be"}/accounts/ | grep Password | sed s/"^.*Password\:.... "/""/g | sed s/"<.*"/""/g)
|
||||
export OPENVPN_PASSWORD=$(curl -s https://freevpn.${FREEVPN_DOMAIN:-"me"}/accounts/ | grep Password | sed s/"^.*Password\:.... "/""/g | sed s/"<.*"/""/g)
|
||||
|
||||
# Update FreeVPN certs
|
||||
/etc/openvpn/updateFreeVPN.sh
|
||||
|
||||
# Add daily update to cron
|
||||
crontab -l > tempcron
|
||||
echo "0 1 * * * /etc/openvpn/updateFreeVPN.sh" > tempcron
|
||||
crontab tempcron
|
||||
rm tempcron
|
||||
elif [[ "${OPENVPN_PROVIDER^^}" = "VPNBOOK" ]]
|
||||
then
|
||||
pwd_url=$(curl -s "https://www.vpnbook.com/freevpn" | grep -m2 "Password:" | tail -n1 | cut -d \" -f2)
|
||||
|
Reference in New Issue
Block a user