1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic.git synced 2024-12-11 23:41:32 +01:00

print if someone is already running

This commit is contained in:
L3D 2022-01-10 11:17:20 +01:00
parent 3bd09b48f8
commit 619f4263e9
Signed by: l3d
GPG key ID: CD08445BFF4313D1

View file

@ -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 -%}