mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
backup.sh: rename backup.list to tobackup.conf & move to /var/tuxbox/config/t (thx svenhoefer)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1948 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1922213fc4
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-12-06 (Tue, 06 Dec 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -5,4 +5,4 @@ SUBDIRS += lcd
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
configdir = $(CONFIGDIR)
|
configdir = $(CONFIGDIR)
|
||||||
config_DATA = cables.xml satellites.xml encoding.conf
|
config_DATA = cables.xml satellites.xml encoding.conf tobackup.conf
|
||||||
|
@@ -3,8 +3,7 @@ installdir = $(bindir)
|
|||||||
install_DATA = \
|
install_DATA = \
|
||||||
backup.sh \
|
backup.sh \
|
||||||
restore.sh \
|
restore.sh \
|
||||||
install.sh \
|
install.sh
|
||||||
backup.list
|
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
chmod 0755 $(DESTDIR)$(bindir)/backup.sh
|
chmod 0755 $(DESTDIR)$(bindir)/backup.sh
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
/bin/backup.sh
|
|
||||||
/bin/backup.list
|
|
||||||
/var/tuxbox/config/
|
|
@@ -1,12 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
DATE=`date +%Y-%m-%d-%H:%M:%S`
|
|
||||||
BACKUPLIST=/bin/backup.list
|
DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
||||||
|
USRF="/var/tuxbox/config/tobackup.conf"
|
||||||
|
|
||||||
|
if [ -e "${USRF}" ]; then
|
||||||
|
# read user-files from $USRF
|
||||||
|
while read i
|
||||||
|
do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}"
|
||||||
|
done < $USRF
|
||||||
|
|
||||||
|
else
|
||||||
|
TOBACKUP="/var/tuxbox/config/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check existence
|
||||||
|
RES=""
|
||||||
|
for i in $TOBACKUP
|
||||||
|
do [ -e "$i" ] && RES="$RES $i"
|
||||||
|
done
|
||||||
|
|
||||||
|
TOBACKUP=$(echo $RES)
|
||||||
|
|
||||||
echo Backup to $1/settings_$DATE.tar
|
echo Backup to $1/settings_$DATE.tar
|
||||||
cd /
|
|
||||||
|
|
||||||
if [ ! -e $BACKUPLIST ]; then
|
tar -cf $1/settings_$DATE.tar $TOBACKUP
|
||||||
tar cf $1/settings_$DATE.tar /var/tuxbox/config/
|
|
||||||
else
|
|
||||||
tar cf $1/settings_$DATE.tar -T $BACKUPLIST
|
|
||||||
fi
|
|
||||||
|
6
data/tobackup.conf
Normal file
6
data/tobackup.conf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# enter stuff you want to backup here.
|
||||||
|
# one file or directory per line
|
||||||
|
#
|
||||||
|
# /var/etc/rcS.local # an example for a single file
|
||||||
|
# /var/tuxbox/config/tuxtxt/ # an example for a complete directory
|
||||||
|
/var/tuxbox/config/ # old default
|
Reference in New Issue
Block a user