#!/bin/sh
# Pt-baselayout/src/baselayout-files/all/etc/cron.hourly/config-backup
# 
#  Copyright: ©2013, Güralp Systems Ltd.
#  Author: Laurence Withers <lwithers@guralp.com>
#  License: GPLv3
#

# ensure we have somewhere to write backups to
BACKUP_PATH="/var/lib/config-backup.auto"
mkdir -p "${BACKUP_PATH}"

# this will test for any config files that changed within the last hour
# and write a backup if it finds any
config-backup-autoscan --duration 3600 --path "${BACKUP_PATH}"
