Update tools.py

This commit is contained in:
gutosie
2024-01-20 17:41:40 +02:00
committed by GitHub
parent 769bd2de0a
commit de1c6e7ddb

View File

@@ -971,6 +971,7 @@ class MyUpgrade2(Screen):
self.activityTimer.start(10) self.activityTimer.start(10)
def updateInfo(self): def updateInfo(self):
os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local')
periodo = '/usr/lib/periodon' periodo = '/usr/lib/periodon'
testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*' testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*'
zerotier = '/var/lib/zerotier-one/identity.secret' zerotier = '/var/lib/zerotier-one/identity.secret'
@@ -1003,9 +1004,10 @@ class MyUpgrade2(Screen):
cmd2 = 'cp -af ' + testinout + ' ' + target2 cmd2 = 'cp -af ' + testinout + ' ' + target2
system(cmd2) system(cmd2)
#cmd3 #cmd3
if fileExists('/var/lib/zerotier-one/identity.secret'): if fileExists('%sImageBoot/%s/var/lib/zerotier-one/' % (getNeoLocation(), getImageNeoBoot())):
cmd = 'cp -af ' + zerotier + ' ' + target3 if fileExists('/var/lib/zerotier-one/identity.secret'):
system(cmd) cmd = 'cp -af ' + zerotier + ' ' + target3
system(cmd)
cmd4 = 'cp -af ' + S99neo + ' ' + target4 cmd4 = 'cp -af ' + S99neo + ' ' + target4
system(cmd4) system(cmd4)
if fileExists('/linuxrootfs1'): if fileExists('/linuxrootfs1'):
@@ -1024,6 +1026,7 @@ class MyUpgrade2(Screen):
out = open('%sImageBoot/.version' % getNeoLocation(), 'w') out = open('%sImageBoot/.version' % getNeoLocation(), 'w')
out.write(PLUGINVERSION) out.write(PLUGINVERSION)
out.close() out.close()
os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh')
self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!')) self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!'))
def myClose(self, message): def myClose(self, message):