#!/bin/sh #----------------------------------------------------------------------------- # /var/install/bin/firebird-tools-dbcheck - Firebird SQL Server db check # # Creation: 2004-02-14 jv # Last Update: $Id$ # # 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. #----------------------------------------------------------------------------- #include eislib . /var/install/include/eislib export FIREBIRD='/usr/local/firebird' # check run firebird if [ -z "`ps -e | grep 'fbserver' | grep -v grep `" ] then mecho "" mecho -error "Firebird is not running" mecho "" anykey exit 1 fi clrhome # read the ISC_PASSWORD only pw=`grep ISC_PASSWORD= ${FIREBIRD}/isc4.pw | sed "s/ISC_PASSWORD=//g"` # Read DATA_DIRECTORY . /etc/config.d/firebird # Run file-select tool /var/install/bin/list-files.cui -t "Select database for check"\ -c "Database:"\ --path=$FIREBIRD_DATA_DIRECTORY \ --filter=*.fdb,*.gdb \ --only=1 \ --date \ --wait \ --script="${FIREBIRD}/bin/gfix -mend -full -user SYSDBA -password ${pw} " \ --helpfile=/var/install/help/firebird \ --helpname=FIREBIRD_MENU_RESTORE mecho "" anykey #----------------------------------------------------------------------------- exit 0