2019-08-13 03:29:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
apt -y update
|
|
|
|
|
|
|
|
while [ true ]; do
|
|
|
|
if [ ! -f /home/pivpn/ovpns/mynode_vpn.ovpn ]; then
|
|
|
|
/usr/bin/mynode_setup_vpn.sh
|
|
|
|
|
|
|
|
mkdir -p /home/pivpn/ovpns
|
2019-08-17 04:08:49 +00:00
|
|
|
pivpn add -n mynode_vpn nopass -d 3650
|
2019-08-13 03:29:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
systemctl enable openvpn
|
|
|
|
systemctl start openvpn
|
|
|
|
sleep 365d
|
|
|
|
done
|