#!/bin/sh

# Copyright (C) 2015-2019 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2015-2019 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-only

# {{ ansible_managed }}

# Launch rsnapshot {{ item }} backups

scheduler="{{ ansible_local.fhs.sbin|d('/usr/local/sbin') + '/rsnapshot-scheduler' }}"
scheduler_item="{{ item }}"

if test -x "${scheduler}" ; then
    "${scheduler}" schedule "${scheduler_item}" all
fi
