update nginx, set wan interface for wo dashboard

This commit is contained in:
VirtuBox
2019-04-24 02:01:50 +02:00
parent 51963091a4
commit 78fd8bbb44
5 changed files with 19 additions and 3 deletions

View File

@@ -22,6 +22,13 @@ class WOVariables():
if wo_wpcli_path == '':
wo_wpcli_path = '/usr/local/bin/wp '
# get wan network interface name
wo_wan_interface = os.popen("ip -4 route get 8.8.8.8 | "
"grep -oP \"dev [^[:space:]]+ \" "
"| cut -d ' ' -f 2").read()
if wo_wan_interface == '':
wo_wan_interface = 'eth0'
# Current date and time of System
wo_date = datetime.datetime.now().strftime('%d%b%Y%H%M%S')