|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
logger -s -t "reset_button" "Reset button pressed, restoring from backup"
|
|
|
|
|
|
|
|
|
|
# specify the backup file
|
|
|
|
|
BACKUP_FILE="/etc/resetbutton.tar"
|
|
|
|
|
BACKUP_FILE="/etc/resetbutton.tar.gz"
|
|
|
|
|
|
|
|
|
|
# check if backup file exists
|
|
|
|
|
if [ -f "$BACKUP_FILE" ]; then
|
|
|
|
@ -18,7 +18,7 @@ if [ -f "$BACKUP_FILE" ]; then
|
|
|
|
|
service_stop_all
|
|
|
|
|
|
|
|
|
|
# Extract the backup file
|
|
|
|
|
tar -xf $BACKUP_FILE -C /
|
|
|
|
|
tar -xzf $BACKUP_FILE -C /
|
|
|
|
|
|
|
|
|
|
# restart all services
|
|
|
|
|
service_start_all
|
|
|
|
@ -32,4 +32,4 @@ else
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# sync to make sure all changes are written to disk
|
|
|
|
|
sync
|
|
|
|
|
sync
|