#!/usr/bin/haserl -u 200 -U /var/tmp PATH=/bin:/usr/bin:/sbin:/usr/sbin . /usr/lib/libmodcgi.sh cgi_begin '$(lang de:"Konfiguration wiederherstellen (Restore)" en:"Restore configuration")' 'do_restore' ?>
{ cd /var/tmp export BACKUP_DIR='var_flash' export DS_BCK_FILE='ds_mod' export FREETZ_BCK_FILE='freetz' rm -rf $BACKUP_DIR echo "$(lang de:"Sicherungsdateien extrahieren" en:"Extracting backup files")..." tar xvzf $FORM_uploadfile echo "$(lang de:"Konfiguration wiederherstellen" en:"Restoring configuration")..." if [ -e "$BACKUP_DIR/$DS_BCK_FILE" ]; then echo "$(lang de:"Alte Sicherungsdatei gefunden" en:"Found old backup file")" mv $BACKUP_DIR/$DS_BCK_FILE $BACKUP_DIR/$FREETZ_BCK_FILE fi if [ "$FORM_freetz_only" = "on" ]; then echo "cat $BACKUP_DIR/$FREETZ_BCK_FILE > /var/flash/freetz" cat $BACKUP_DIR/$FREETZ_BCK_FILE > /var/flash/freetz else for file in $(ls $BACKUP_DIR); do echo "cat $BACKUP_DIR/$file > /var/flash/$file" cat $BACKUP_DIR/$file > /var/flash/$file done fi echo "$(lang de:"ERLEDIGT" en:"DONE")" echo "$(lang de:"Sicherungsdateien löschen" en:"Removing backup")..." rm -rf $BACKUP_DIR rm -f $FORM_uploadfile echo "$(lang de:"ERLEDIGT" en:"DONE")" if [ "$FORM_restart" = "on" ]; then echo "$(lang de:"Neustart in 5 Sekunden" en:"Restarting in 5 seconds")..." (sleep 5; reboot)& fi } | html ?>else ?> $(lang de:"Sie haben keine Sicherungs-Datei zum Hochladen ausgewählt. Der Zustand" en:"You have not selected any backup file to upload. The Fritz!Box's") $(lang de:"der Fritz!Box wurde nicht verändert." en:"configuration was not changed.") fi ?>
cgi_end ?>