lobaro / restic-backup-docker

A docker container to automate backups with restic
Apache License 2.0
330 stars 114 forks source link

Backup not aborting correctly after error #52

Closed mrclschstr closed 3 years ago

mrclschstr commented 3 years ago

Hi all,

my backup failed today but the script didn't abort correctly. I think it's better to use exit 1 instead of the kill in the following line:

https://github.com/lobaro/restic-backup-docker/blob/ec42bdd04c68553101c6012018592979cdc4abf3/backup.sh#L35

The kill command is more useful for killing processes than for quitting scripts.

What do you think?

EDIT: By the way... with kill 1 you are trying to killing the process with pid 1 😉

niondir commented 3 years ago

Looks like an bug. I agree that it should be exit 1

niondir commented 3 years ago

I just changed it.