forked from protonphoton/LJ
[fix] removes unused update ui script
This commit is contained in:
parent
847fd0562e
commit
6d4dae4070
31
updateUI.py
31
updateUI.py
@ -1,31 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# -*- mode: Python -*-
|
|
||||||
'''
|
|
||||||
LJ UI IP updater v0.9.0
|
|
||||||
|
|
||||||
MUST be called from configure.py
|
|
||||||
|
|
||||||
'''
|
|
||||||
|
|
||||||
import os, sys
|
|
||||||
import fileinput
|
|
||||||
from shutil import copyfile
|
|
||||||
ljpath = r'%s' % os.getcwd().replace('\\','/')
|
|
||||||
|
|
||||||
def www(config):
|
|
||||||
global ljpath
|
|
||||||
wwwip = config.get('General','wwwip')
|
|
||||||
wstype = config.get('General','wstype')
|
|
||||||
wsport = config.get('General','wsport')
|
|
||||||
# copy template
|
|
||||||
src = ljpath + "/templates/config.js"
|
|
||||||
dst = ljpath + "/www/config.js"
|
|
||||||
copyfile(src, dst)
|
|
||||||
# Interpolate variables
|
|
||||||
with fileinput.FileInput(dst, inplace=True) as file:
|
|
||||||
for line in file:
|
|
||||||
line = line.replace("%wstype%", wstype)
|
|
||||||
line = line.replace("%wsport%", wsport)
|
|
||||||
line = line.replace("%wwwip%", wwwip)
|
|
||||||
print(line, end='')
|
|
Loading…
Reference in New Issue
Block a user