Unify component setup across categories and retain two installation backups
This commit is contained in:
@@ -218,6 +218,9 @@ def update(base, rollback=False, force=False, api_ports=None, reuse_runtime=Fals
|
||||
if was_running:run('docker','start',config['name'])
|
||||
raise RuntimeError('Update fehlgeschlagen. Vorheriger Deck-Container wiederhergestellt.') from None
|
||||
run('docker','rm',backup_name)
|
||||
# Keep only two automatic pre-update state snapshots after a successful update.
|
||||
snapshots=sorted((p for p in (base/'backups').iterdir() if p.is_dir() and not p.is_symlink() and p.name.isdigit()),key=lambda p:int(p.name))
|
||||
for snapshot in snapshots[:-2]:shutil.rmtree(snapshot)
|
||||
print('Nur Athena Deck wurde aktualisiert. Vorheriges Image bleibt für --rollback erhalten.')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user