mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
data/scripts: remove some hardcoded paths
Origin commit data
------------------
Branch: ni/coolstream
Commit: 93ca7b0ef1
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-11-26 (Thu, 26 Nov 2020)
Origin message was:
------------------
- data/scripts: remove some hardcoded paths
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -478,6 +478,14 @@ AC_CONFIG_FILES([
|
|||||||
data/control/migration.sh
|
data/control/migration.sh
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Backup scripts
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
data/scripts/backup.sh
|
||||||
|
data/scripts/restore.sh
|
||||||
|
data/scripts/backup_flash.sh
|
||||||
|
data/scripts/restore_flash.sh
|
||||||
|
])
|
||||||
|
|
||||||
# Backup configs
|
# Backup configs
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
data/config/settingsupdate.conf
|
data/config/settingsupdate.conf
|
||||||
|
@@ -51,9 +51,13 @@
|
|||||||
@CONFIGDIR@/srv.conf
|
@CONFIGDIR@/srv.conf
|
||||||
@CONFIGDIR@/flex/flex_eigene_scripte.conf
|
@CONFIGDIR@/flex/flex_eigene_scripte.conf
|
||||||
|
|
||||||
|
@FLAGDIR@/
|
||||||
|
|
||||||
/var/bin/
|
/var/bin/
|
||||||
/var/etc/
|
|
||||||
/var/keys/
|
/var/keys/
|
||||||
|
/var/log/
|
||||||
|
/var/root/
|
||||||
|
/var/xupnpd/
|
||||||
|
|
||||||
/etc/exports
|
/etc/exports
|
||||||
/etc/hostname
|
/etc/hostname
|
||||||
@@ -62,6 +66,7 @@
|
|||||||
/etc/passwd
|
/etc/passwd
|
||||||
/etc/profile.local
|
/etc/profile.local
|
||||||
/etc/resolv.conf
|
/etc/resolv.conf
|
||||||
|
/etc/samba/smb.conf
|
||||||
/etc/wpa_supplicant.conf
|
/etc/wpa_supplicant.conf
|
||||||
|
|
||||||
## Persönliche Sicherungen
|
## Persönliche Sicherungen
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
EXTRA_DIST = \
|
||||||
|
backup.sh backup.sh.in \
|
||||||
|
restore.sh restore.sh.in \
|
||||||
|
backup_flash.sh backup_flash.sh.in \
|
||||||
|
restore_flash.sh restore_flash.sh.in
|
||||||
|
|
||||||
installdir = $(bindir)
|
installdir = $(bindir)
|
||||||
|
|
||||||
install_SCRIPTS = \
|
install_SCRIPTS = \
|
||||||
|
@@ -1,78 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. /etc/init.d/globals
|
|
||||||
|
|
||||||
HOST=$(hostname)
|
|
||||||
DATE=$(date +%Y%m%d_%H%M)
|
|
||||||
USRF="/var/tuxbox/config/tobackup.conf"
|
|
||||||
BAKF="$1/${2:-settings_${HOST}_${DATE}}.tar.gz"
|
|
||||||
|
|
||||||
TOBACKUP="\
|
|
||||||
/etc/exports \
|
|
||||||
/etc/hostname \
|
|
||||||
/etc/network/interfaces \
|
|
||||||
/etc/passwd \
|
|
||||||
/etc/profile.local \
|
|
||||||
/etc/resolv.conf \
|
|
||||||
/etc/samba/smb.conf \
|
|
||||||
/etc/wpa_supplicant.conf \
|
|
||||||
/share/tuxbox/neutrino/flex/flex_user.conf \
|
|
||||||
/var/bin/ \
|
|
||||||
/var/etc/ \
|
|
||||||
/var/keys/ \
|
|
||||||
/var/log/ \
|
|
||||||
/var/root/ \
|
|
||||||
/var/tuxbox/config/auto-record-cleaner.* \
|
|
||||||
/var/tuxbox/config/doscam.* \
|
|
||||||
/var/tuxbox/config/FritzCallMonitor.addr \
|
|
||||||
/var/tuxbox/config/FritzCallMonitor.cfg \
|
|
||||||
/var/tuxbox/config/moviebrowser.conf \
|
|
||||||
/var/tuxbox/config/neutrino.conf \
|
|
||||||
/var/tuxbox/config/oscam.* \
|
|
||||||
/var/tuxbox/config/oscammon.conf \
|
|
||||||
/var/tuxbox/config/pr-auto-timer.* \
|
|
||||||
/var/tuxbox/config/radio-favorites.xml \
|
|
||||||
/var/tuxbox/config/scan.conf \
|
|
||||||
/var/tuxbox/config/settingsupdate.conf \
|
|
||||||
/var/tuxbox/config/smarthomeinfo.conf \
|
|
||||||
/var/tuxbox/config/timerd.conf \
|
|
||||||
/var/tuxbox/config/tuxcal/ \
|
|
||||||
/var/tuxbox/config/tuxcom/ \
|
|
||||||
/var/tuxbox/config/tuxmail/ \
|
|
||||||
/var/tuxbox/config/tuxtxt/tuxtxt2.conf \
|
|
||||||
/var/tuxbox/config/tuxwetter/tuxwetter.conf \
|
|
||||||
/var/tuxbox/config/tuxwetter/tuxwetter.mcfg \
|
|
||||||
/var/tuxbox/config/Y-Web.conf \
|
|
||||||
/var/tuxbox/config/zapit/ \
|
|
||||||
/var/tuxbox/control/ \
|
|
||||||
/var/tuxbox/fonts/ \
|
|
||||||
/var/tuxbox/httpd/ \
|
|
||||||
/var/tuxbox/icons/ \
|
|
||||||
/var/tuxbox/locale/ \
|
|
||||||
/var/tuxbox/plugins/ \
|
|
||||||
/var/tuxbox/themes/ \
|
|
||||||
/var/tuxbox/webradio/ \
|
|
||||||
/var/tuxbox/webtv/ \
|
|
||||||
/var/xupnpd/ \
|
|
||||||
"
|
|
||||||
|
|
||||||
SHOWINFO "backup to ${BAKF} ..."
|
|
||||||
|
|
||||||
if [ -e "${USRF}" ]; then
|
|
||||||
TOBACKUP="$TOBACKUP ${USRF}"
|
|
||||||
while read i
|
|
||||||
do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}"
|
|
||||||
done < $USRF
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check existence
|
|
||||||
RES=""
|
|
||||||
for i in $TOBACKUP
|
|
||||||
do [ -e "$i" ] && RES="$RES $i"
|
|
||||||
done
|
|
||||||
|
|
||||||
TOBACKUP=$(echo $RES)
|
|
||||||
|
|
||||||
tar -czf "${BAKF}" $TOBACKUP 2>&1 >/dev/null
|
|
||||||
|
|
||||||
SHOWINFO "done."
|
|
87
data/scripts/backup.sh.in
Normal file
87
data/scripts/backup.sh.in
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/init.d/globals
|
||||||
|
|
||||||
|
HOST=$(hostname)
|
||||||
|
DATE=$(date +%Y%m%d_%H%M)
|
||||||
|
USRF="@CONFIGDIR@/tobackup.conf"
|
||||||
|
BAKF="$1/${2:-settings_${HOST}_${DATE}}.tar.gz"
|
||||||
|
|
||||||
|
TOBACKUP="\
|
||||||
|
@CONFIGDIR@/settingsupdate.conf \
|
||||||
|
\
|
||||||
|
@CONFIGDIR@/auto-record-cleaner.* \
|
||||||
|
@CONFIGDIR@/doscam.* \
|
||||||
|
@CONFIGDIR@/FritzCallMonitor.addr \
|
||||||
|
@CONFIGDIR@/FritzCallMonitor.cfg \
|
||||||
|
@CONFIGDIR@/moviebrowser.conf \
|
||||||
|
@CONFIGDIR@/neutrino.conf \
|
||||||
|
@CONFIGDIR@/oscam.* \
|
||||||
|
@CONFIGDIR@/oscammon.conf \
|
||||||
|
@CONFIGDIR@/pr-auto-timer.* \
|
||||||
|
@CONFIGDIR@/radio-favorites.xml \
|
||||||
|
@CONFIGDIR@/scan.conf \
|
||||||
|
@CONFIGDIR@/smarthomeinfo.conf \
|
||||||
|
@CONFIGDIR@/timerd.conf \
|
||||||
|
@CONFIGDIR@/tuxcal/ \
|
||||||
|
@CONFIGDIR@/tuxcom/ \
|
||||||
|
@CONFIGDIR@/tuxmail/ \
|
||||||
|
@CONFIGDIR@/tuxtxt/tuxtxt2.conf \
|
||||||
|
@CONFIGDIR@/tuxwetter/tuxwetter.conf \
|
||||||
|
@CONFIGDIR@/tuxwetter/tuxwetter.mcfg \
|
||||||
|
@CONFIGDIR@/Y-Web.conf \
|
||||||
|
@CONFIGDIR@/zapit/ \
|
||||||
|
\
|
||||||
|
@FLAGDIR@/ \
|
||||||
|
\
|
||||||
|
/var/bin/ \
|
||||||
|
/var/keys/ \
|
||||||
|
/var/log/ \
|
||||||
|
/var/root/ \
|
||||||
|
/var/xupnpd/ \
|
||||||
|
\
|
||||||
|
/etc/exports \
|
||||||
|
/etc/hostname \
|
||||||
|
/etc/hosts \
|
||||||
|
/etc/network/interfaces \
|
||||||
|
/etc/passwd \
|
||||||
|
/etc/profile.local \
|
||||||
|
/etc/resolv.conf \
|
||||||
|
/etc/samba/smb.conf \
|
||||||
|
/etc/wpa_supplicant.conf \
|
||||||
|
\
|
||||||
|
@DATADIR@/neutrino/flex/flex_user.conf \
|
||||||
|
@DATADIR_VAR@/flex/flex_user.conf \
|
||||||
|
\
|
||||||
|
@CONTROLDIR_VAR@/ \
|
||||||
|
@FONTDIR_VAR@/ \
|
||||||
|
@ICONSDIR_VAR@/ \
|
||||||
|
@LOCALEDIR_VAR@/ \
|
||||||
|
@LUAPLUGINDIR_VAR@/ \
|
||||||
|
@PLUGINDIR_VAR@/ \
|
||||||
|
@PUBLIC_HTTPDDIR@/ \
|
||||||
|
@THEMESDIR_VAR@/ \
|
||||||
|
@WEBRADIODIR_VAR@/ \
|
||||||
|
@WEBTVDIR_VAR@/ \
|
||||||
|
"
|
||||||
|
|
||||||
|
SHOWINFO "backup to ${BAKF} ..."
|
||||||
|
|
||||||
|
if [ -e "${USRF}" ]; then
|
||||||
|
TOBACKUP="$TOBACKUP ${USRF}"
|
||||||
|
while read i
|
||||||
|
do [ "${i:0:1}" = "#" ] || TOBACKUP="$TOBACKUP ${i%%#*}"
|
||||||
|
done < $USRF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check existence
|
||||||
|
RES=""
|
||||||
|
for i in $TOBACKUP
|
||||||
|
do [ -e "$i" ] && RES="$RES $i"
|
||||||
|
done
|
||||||
|
|
||||||
|
TOBACKUP=$(echo $RES)
|
||||||
|
|
||||||
|
tar -czf "${BAKF}" $TOBACKUP 2>&1 >/dev/null
|
||||||
|
|
||||||
|
SHOWINFO "done."
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
RES=""
|
RES=""
|
||||||
VAR="/var/"
|
VAR="/var/"
|
||||||
USRF="/var/tuxbox/config/tobackup.conf"
|
USRF="@CONFIGDIR@/tobackup.conf"
|
||||||
BAKF="/var/backup_flash.tar.gz"
|
BAKF="/var/backup_flash.tar.gz"
|
||||||
|
|
||||||
TOBACKUP=""
|
TOBACKUP=""
|
Reference in New Issue
Block a user