mynode/rootfs/standard/usr/bin/mynode_vpn.sh

16 lines
308 B
Bash
Raw Normal View History

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
pivpn add -n mynode_vpn -p bolt -d 3650
fi
systemctl enable openvpn
systemctl start openvpn
sleep 365d
done