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