8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-26 10:43:03 +01:00
firebird-mirror/builds/install/arch-specific/linux/super/preuninstall.sh.in
2003-09-08 19:31:12 +00:00

55 lines
976 B
Bash

#! /bin/sh
#------------------------------------------------------------------------
# stop server if it is running
stopServerIfRunning() {
checkString=`ps -ef| egrep "(ibserver|ibguard|fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
/etc/rc.d/init.d/firebird stop
fi
}
#= Main PreUn ================================================================
IBRootDir=/usr/local/firebird
IBBin=$IBRootDir/bin
SecurityDatabase=isc4.gdb
stopServerIfRunning
/sbin/chkconfig --del firebird
cd $IBRootDir
if [ -f $SecurityDatabase ]
then
cp $SecurityDatabase /tmp
echo "Saved a copy of SecurityDatabase ($SecurityDatabase) in /tmp"
fi
for i in isc_init1* isc_event1* isc_lock1* isc_guard* firebird.log SYSDBA.password
do
if [ -f $i ]
then
rm -f $i
fi
done
rm -f $IBBin/fbmgr
userdel firebird