Resolve Issue #90, named Make backup on container shutdown, adding feature to make backup on container shutdown.
To archieve a container gracefully stop, it traps SIGHUP, SIGINT, SIGTERM signals from run.sh.
As trap in a docker container only works for the main process, to correctly trap the signals, it was necessary to make crond as a background deamon, paying attention to keep crond logs on main container log journal.
It uses EXIT_BACKUP environment variable, as described on updated Readme.md:
EXIT_BACKUP: If set, create a backup when the container stops.
Resolve Issue #90, named Make backup on container shutdown, adding feature to make backup on container shutdown. To archieve a container gracefully stop, it traps SIGHUP, SIGINT, SIGTERM signals from run.sh.
As trap in a docker container only works for the main process, to correctly trap the signals, it was necessary to make crond as a background deamon, paying attention to keep crond logs on main container log journal.
It uses
EXIT_BACKUP
environment variable, as described on updated Readme.md:EXIT_BACKUP
: If set, create a backup when the container stops.