mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
- data/scripts: remove some hardcoded paths
Conflicts: data/config/settingsupdate.conf.in data/scripts/backup.sh data/scripts/backup_flash.sh.in data/scripts/restore_flash.sh.in Signed-off-by: Thilo Graf <dbt@novatux.de> Files adapted because conflicts and possible build errors.
This commit is contained in:
20
data/scripts/restore.sh.in
Executable file
20
data/scripts/restore.sh.in
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
echo Restore settings from $1
|
||||
|
||||
tar t -f $1 | grep ^config/ > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
cd /var/tuxbox
|
||||
else
|
||||
cd /
|
||||
fi
|
||||
|
||||
# check if $1 ends with "gz"
|
||||
if [ "$1" != "${1%gz}" ]; then
|
||||
tar -xzf $1
|
||||
else
|
||||
tar -xf $1
|
||||
fi
|
||||
|
||||
sync
|
||||
sync
|
||||
reboot -f
|
Reference in New Issue
Block a user