@@ -137,22 +137,9 @@ def restore_if_modified(context: Context) -> None:
137137 _stop_proxy (context , "tunnel_proxy" , "proxy_loop" )
138138 _stop_proxy (context , "interception_proxy" , "interception_proxy_loop" )
139139
140- # Check for backups from both proxy and TLS scenarios
141- _LLAMA_STACK_TLS_BACKUP = "run.yaml.tls-backup"
142- backup_to_restore = None
143140 if os .path .exists (_LLAMA_STACK_CONFIG_BACKUP ):
144- backup_to_restore = _LLAMA_STACK_CONFIG_BACKUP
145- elif os .path .exists (_LLAMA_STACK_TLS_BACKUP ):
146- backup_to_restore = _LLAMA_STACK_TLS_BACKUP
147-
148- if backup_to_restore :
149- print (f"Restoring original Llama Stack config from { backup_to_restore } ..." )
150- shutil .copy (backup_to_restore , _LLAMA_STACK_CONFIG )
151- os .remove (backup_to_restore )
152- # Clean up the other backup too if it exists
153- for other_backup in [_LLAMA_STACK_CONFIG_BACKUP , _LLAMA_STACK_TLS_BACKUP ]:
154- if other_backup != backup_to_restore and os .path .exists (other_backup ):
155- os .remove (other_backup )
141+ print (f"Restoring original Llama Stack config from { _LLAMA_STACK_CONFIG_BACKUP } ..." )
142+ shutil .move (_LLAMA_STACK_CONFIG_BACKUP , _LLAMA_STACK_CONFIG )
156143 restart_container ("llama-stack" )
157144 restart_container ("lightspeed-stack" )
158145
0 commit comments