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

63 lines
1.3 KiB
Bash
Raw Normal View History

2003-07-09 00:59:57 +02:00
#! /bin/sh
#------------------------------------------------------------------------
# remove line from config file if it exists in it.
removeLineFromFile() {
FileName=$1
oldLine=$2
if [ ! -z "$oldLine" ]
then
cat $FileName | grep -v "$oldLine" > ${FileName}.tmp
mv ${FileName}.tmp $FileName
echo "Updated."
fi
}
2003-09-08 21:31:12 +02:00
#= Main PostUn ===============================================================
2003-07-09 00:59:57 +02:00
# Update /etc/services
FileName=/etc/services
oldLine=`grep "^gds_db" $FileName`
removeLineFromFile "$FileName" "$oldLine"
2003-10-27 19:00:44 +01:00
# If we have right systems remove the service autoconfig stuff.
if [ -x sbin/insserv ]
then
sbin/insserv /etc/init.d/
fi
if [ -x sbin/chkconfig ]
then
/sbin/chkconfig --del firebird
fi
# Remove /usr/sbin/rcfirebird symlink
if [ -e /usr/sbin/rcfirebird ]
then
rm -f /usr/sbin/rcfirebird
fi
# Remove initd script
if [ -e /etc/init.d/firebird ]
then
rm -f /etc/init.d/firebird
fi
if [ -e /etc/rc.d/init.d/firebird ]
then
rm -f /etc/rc.d/init.d/firebird
fi