1
0
Fork 0
sys-backup-skel/cron.monthly.main-backup.sh

24 lines
356 B
Bash

#!/bin/bash
# Mount the backup partition DEV
#+ and execute all *.active scripts in the SCRIPTDIR directory
MOUNTPOINT="/tmp/backup_partition"
DEV="/dev/sda4"
ERR_NOSCRIPT=2
[ -d $MOUNTPOINT ] || mkdir $MOUNTPOINT
mount $DEV $MOUNTPOINT
[ ! -d $SCRIPTDIR ] && exit $ERR_NOSCRIPT
for s in $SCRIPTDIR/*.active
do
[ -x $s ] && ./$s
done
umount $DEV