forked from coop-cloud/backup-bot-two
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			feature/do
			...
			fix-quotes
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d2087a441e | |||
| f4d96b0875 | 
| @ -82,6 +82,7 @@ Add your `SSH_KEY` as docker secret: | ||||
| abra app secret insert <app_name> ssh_key v1 """$(cat backupkey) | ||||
| """ | ||||
| ``` | ||||
| > Attention: This command needs to be executed exactly as stated above, because it places a trailing newline at the end, if this is missing you will get the following error: `Load key "/run/secrets/ssh_key": error in libcrypto` | ||||
|  | ||||
| ### Restic REST server Storage | ||||
|  | ||||
|  | ||||
| @ -139,7 +139,7 @@ def run_commands(commands): | ||||
|         command = command.removeprefix('bash -c').removeprefix('sh -c') | ||||
|         # Remove quotes surrounding the command | ||||
|         if (len(command) >= 2 and command[0] == command[-1] and (command[0] == "'" or command[0] == '"')): | ||||
|             command[1:-1] | ||||
|             command = command[1:-1] | ||||
|         # Use bash's pipefail to return exit codes inside a pipe to prevent silent failure | ||||
|         command = f"bash -c 'set -o pipefail;{command}'" | ||||
|         logging.info(f"run command in {container.name}:") | ||||
|  | ||||
		Reference in New Issue
	
	Block a user