mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 21:23:04 +01:00
33 lines
596 B
Bash
33 lines
596 B
Bash
#! /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
|
|
}
|
|
|
|
|
|
|
|
#= Main PostUn ===============================================================
|
|
|
|
|
|
# Update /etc/services
|
|
|
|
|
|
FileName=/etc/services
|
|
oldLine=`grep "^gds_db" $FileName`
|
|
|
|
removeLineFromFile "$FileName" "$oldLine"
|
|
|