mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-09 13:23:30 +01:00
print if someone is already running
This commit is contained in:
parent
3bd09b48f8
commit
619f4263e9
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ trap "rm -f $pid" SIGSEGV
|
|||
trap "rm -f $pid" SIGINT
|
||||
|
||||
if [ -e $pid ]; then
|
||||
echo "A nother version of this restic backup script is already running!"
|
||||
{% if item.mail_on_error is defined and item.mail_on_error == true %}
|
||||
mail -s "starting restic backup failed on {{ ansible_hostname }}" {{ item.mail_address }} <<< "Another restic backup process is already running. We canceled starting a new restic backup script running at {{ ansible_hostname }} at $(date -u '+%Y-%m-%d %H:%M:%S').
|
||||
{%- if item.src is defined -%}
|
||||
|
|
Loading…
Reference in a new issue