update nginx, set wan interface for wo dashboard
This commit is contained in:
@@ -1135,6 +1135,12 @@ class WOStackController(CementBaseController):
|
||||
WOExtract.extract(self, '/tmp/wo-dashboard.tar.gz',
|
||||
'{0}22222/htdocs'
|
||||
.format(WOVariables.wo_webroot))
|
||||
if WOVariables.wo_wan_interface != 'eth0':
|
||||
WOFileUtils.searchreplace(self, "{0}22222/htdocs/index.php"
|
||||
.format(WOVariables.wo_webroot),
|
||||
"eth0",
|
||||
"{0}".format(WOVariables.wo_wan_interface))
|
||||
|
||||
Log.debug(self, "Setting Privileges to "
|
||||
"{0}22222/htdocs"
|
||||
.format(WOVariables.wo_webroot))
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user