feat: Logo-Update bei Installation hinzugefügt; Versionsnummer auf 1.0.64 erhöht

This commit is contained in:
2026-05-10 11:36:08 +02:00
parent 23259fcce6
commit fcc277d1d3
2 changed files with 9 additions and 1 deletions

8
app.py
View File

@@ -2033,6 +2033,9 @@ def r_update_install():
# Syntax-Check bevor wir irgendetwas überschreiben
compile(new_code, 'app.py', 'exec')
logo_req = _urlreq.urlopen(f'{RAW_BASE}/PiCopy_Logo.png', timeout=30)
logo_data = logo_req.read()
tmp = Path('/opt/picopy/app.py.tmp')
tmp.write_text(new_code, encoding='utf-8')
with open(tmp, 'rb') as fh:
@@ -2043,6 +2046,11 @@ def r_update_install():
with open(vtmp, 'rb') as fh:
os.fsync(fh.fileno())
os.replace(str(vtmp), '/opt/picopy/version.txt')
ltmp = Path('/opt/picopy/PiCopy_Logo.png.tmp')
ltmp.write_bytes(logo_data)
with open(ltmp, 'rb') as fh:
os.fsync(fh.fileno())
os.replace(str(ltmp), '/opt/picopy/PiCopy_Logo.png')
log.info('Update installiert - starte Dienst neu...')
# Systemd startet den Dienst automatisch neu

View File

@@ -1 +1 @@
1.0.63
1.0.64