mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
21 lines
248 B
Bash
21 lines
248 B
Bash
#!/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
|