mirror of
https://github.com/gutosie/neoboot.git
synced 2026-02-25 05:20:42 +01:00
Update tools.py
This commit is contained in:
@@ -101,6 +101,14 @@ def getNeoActivatedtest():
|
||||
|
||||
return neoactivated
|
||||
|
||||
def getNeoPyVer():
|
||||
mytestnb = ''
|
||||
if os.path.exists('/tmp/.nkod'):
|
||||
with open('/tmp/.nkod', 'r') as f:
|
||||
mytestnb = f.readline().strip()
|
||||
f.close()
|
||||
return mytestnb
|
||||
|
||||
if os.path.exists('/etc/hostname'):
|
||||
with open('/etc/hostname', 'r') as f:
|
||||
myboxname = f.readline().strip()
|
||||
@@ -2468,11 +2476,10 @@ class Opis(Screen):
|
||||
if not fileExists("/tmp/NEOBootPY3.tar.gz"):
|
||||
self.session.open(MessageBox,_("Unfortunately, at the moment not found an update, try again later."),MessageBox.TYPE_INFO,10,)
|
||||
if fileExists("/tmp/NEOBootPY3.tar.gz"):
|
||||
cmd1 = "tar -czf /tmp/NEOBootLastcOPY" + UPDATEVERSION + ".tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot; sleep 2; rm -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot; sleep 2; /bin/tar -xzvf /tmp/NEOBootPY3.tar.gz -C /"
|
||||
cmd1 = "tar -czf /tmp/NEOBootLastcOPY" + UPDATEVERSION + ".tar.gz /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot; sleep 2; rm -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot; sleep 2; /bin/tar -xzvf /tmp/NEOBootPY3.tar.gz -C /; sleep 2;"
|
||||
system(cmd1)
|
||||
neoPY = getTestToTest()
|
||||
cmd2 = "sed -i -e ''s/"+neoPY +"/"+neoPY +"/g'' /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py"
|
||||
system(cmd2)
|
||||
cmd2 = "sed -i -e ''s/"+PLUGINVERSION+"/"+getNeoPyVer()+"/g'' /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py"
|
||||
system(cmd2)
|
||||
cmd3 = "sleep 5; killall -9 enigma2"
|
||||
system(cmd3)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user