sysmocom-backup: Allow to back-up more files than the initial config

Creating a new file in /etc/sysmocom/backup.d/ that ends with .backup
will be read during the backup and then be restored. This way we can
easily extend the files to backup.
hfreyther/master-next
Holger Hans Peter Freyther 9 years ago
parent ddc43d20a7
commit 2045245f3a

@ -23,7 +23,18 @@ FILES="\
var/lib/osmocom/hlr.sqlite3 \
etc/lcr \
etc/udhcpd.conf \
etc/sysmocom/backup.d \
"
# Pick some extra files
if [ -e /etc/sysmocom/backup.d/ ]; then
for extra in `ls /etc/sysmocom/backup.d/*.backup`;
do
echo "Add extras from $extra."
FILES="$FILES `cat $extra`"
done
fi
DATE=`date +%Y%m%d`

@ -1,7 +1,7 @@
DESCRIPTION = "sysmocom config backup and restore scripts"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
PR = "r11"
PR = "r12"
SRC_URI = "file://sysmocom-backup file://sysmocom-restore"
RDEPENDS_${PN} = "tar"

Loading…
Cancel
Save