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

55 lines
976 B
Bash
Raw Normal View History

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