Improve VPN regen and display

This commit is contained in:
Taylor Helsper 2019-08-18 17:29:14 -05:00
parent ab97e9a73f
commit aad7a55d0b

View File

@ -51,7 +51,8 @@ def page_regen_vpn():
if pw == None or p.authenticate("admin", pw) == False: if pw == None or p.authenticate("admin", pw) == False:
return redirect(url_for(".page_vpn_info", error_message="Invalid Password")) return redirect(url_for(".page_vpn_info", error_message="Invalid Password"))
os.system("rm /home/pivpn/ovpns/mynode_vpn.ovpn") #os.system("rm /home/pivpn/ovpns/mynode_vpn.ovpn")
os.system("pivpn -r mynode_vpn")
os.system("systemctl stop openvpn") os.system("systemctl stop openvpn")
os.system("systemctl stop vpn") os.system("systemctl stop vpn")
os.system("systemctl start vpn") os.system("systemctl start vpn")