#!/bin/sh #------------------------------------------------------------------------ # /var/install/bin/esniper-restore - restore |es|f| configuration # # Creation : 2010-05-20 dr_snuggles # Last update: $Id: esniper.sh 24159 2010-05-20 15:22:37Z dr_snuggles $ # # Copyright (c) 2010 the eisfair team, # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #------------------------------------------------------------------------ # define this package package='esniper' . /etc/config.d/$package # include eislib . /var/install/include/eislib if [ -z "${EISFAIR_SYSTEM}" ] then # get eisfair system-type . /var/install/include/check-eisfair-version fi # Setup system specific values case "${EISFAIR_SYSTEM}" in eisfair-1) # eisfair-1 code wwwuser="wwwrun:nogroup" ;; *) # code for other systems wwwuser="www-data:www-data" ;; esac archive='es-f_backup.tar.gz' RESTORE () { mecho -info "Unpacking ${archive}." tar xzf /usr/local/${package}/${archive} -C ${ESNIPER_HTML_FOLDER} # cd / # tar xzf /usr/local/${package}/runDir.tar.gz chown -R ${wwwuser} ${ESNIPER_HTML_FOLDER} mecho -info "Done" } clrhome cd /usr/local/${package} if [ -f "${archive}" ] then if [ "$1" == "waitkey" ] then mecho "" ReStore=`/var/install/bin/ask "Do you really want to restore the old configuration?" "y"` if [ "${ReStore}" == "no" ] then mecho "" mecho -warn "Old configuration not restored - abort" mecho "" exit 1 fi fi RESTORE else mecho -warn "${archive} not found - abort" fi if [ "$1" == "waitkey" ] then anykey fi