| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# The contents of this file are subject to the Initial |
| 4 |
# Developer's Public License Version 1.0 (the "License"); |
| 5 |
# you may not use this file except in compliance with the |
| 6 |
# License. You may obtain a copy of the License at |
| 7 |
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. |
| 8 |
# |
| 9 |
# Software distributed under the License is distributed AS IS, |
| 10 |
# WITHOUT WARRANTY OF ANY KIND, either express or implied. |
| 11 |
# See the License for the specific language governing rights |
| 12 |
# and limitations under the License. |
| 13 |
# |
| 14 |
# The Original Code was created by Mark O'Donohue |
| 15 |
# for the Firebird Open Source RDBMS project. |
| 16 |
# |
| 17 |
# Copyright (c) Mark O'Donohue <[email protected]> |
| 18 |
# and all contributors signed below. |
| 19 |
# |
| 20 |
# All Rights Reserved. |
| 21 |
# Contributor(s): ______________________________________. |
| 22 |
# Alex Peshkoff |
| 23 |
# |
| 24 |
|
| 25 |
# UnInstall script for FirebirdSQL database engine |
| 26 |
# http://www.firebirdsql.org |
| 27 |
|
| 28 |
parseArgs ${*} |
| 29 |
|
| 30 |
checkInstallUser |
| 31 |
|
| 32 |
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@ |
| 33 |
PackageVersion=@FIREBIRD_PACKAGE_VERSION@ |
| 34 |
CpuType=@CPU_TYPE@ |
| 35 |
|
| 36 |
Version="$BuildVersion-$PackageVersion.$CpuType" |
| 37 |
|
| 38 |
if [ ! -z "$InteractiveInstall" ] |
| 39 |
then |
| 40 |
cat <<EOF |
| 41 |
|
| 42 |
Firebird $Version Uninstall program |
| 43 |
|
| 44 |
Are you sure you want to proceed? |
| 45 |
|
| 46 |
EOF |
| 47 |
|
| 48 |
AskQuestion "Press Enter to start uninstall or ^C to abort" |
| 49 |
fi |
| 50 |
|
| 51 |
# Here we are uninstalling from a install tar.gz file |
| 52 |
|
| 53 |
displayMessage "Uninstalling..." |
| 54 |
|
| 55 |
checkIfServerRunning |
| 56 |
|
| 57 |
if [ -f @FB_SECDBDIR@/$SecurityDatabase ]; then |
| 58 |
cp @FB_SECDBDIR@/$SecurityDatabase /tmp |
| 59 |
echo "Saved a copy of SecurityDatabase ($SecurityDatabase) in /tmp" |
| 60 |
chown root:root /tmp/$SecurityDatabase |
| 61 |
chmod 0600 /tmp/$SecurityDatabase |
| 62 |
fi |
| 63 |
|
| 64 |
for i in @FB_GUARDDIR@/fb_guard @FB_LOGDIR@/firebird.log @FB_LOGDIR@/replication.log @FB_CONFDIR@/SYSDBA.password; do |
| 65 |
if [ -f $i ]; then |
| 66 |
rm -f $i |
| 67 |
fi |
| 68 |
done |
| 69 |
|
| 70 |
removeLinksForBackCompatibility |
| 71 |
removeServiceAutostart |
| 72 |
|
| 73 |
if [ -d $PidDir ] |
| 74 |
then |
| 75 |
rm -rf $PidDir |
| 76 |
fi |
| 77 |
|
| 78 |
reconfigDynamicLoader |
| 79 |
|
| 80 |
removeInstalledFiles # Remove installed files |
| 81 |
removeUninstallFiles # Remove the 'uninstall' utility files |
| 82 |
removeEmptyDirs # Remove empty directories |
| 83 |
|
| 84 |
displayMessage "Uninstall completed" |