| 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 Alex Peshkoff |
| 15 |
# for the Firebird Open Source RDBMS project. |
| 16 |
# |
| 17 |
# Copyright (c) 2008 Alex Peshkoff <[email protected]> |
| 18 |
# and all contributors signed below. |
| 19 |
# |
| 20 |
# All Rights Reserved. |
| 21 |
# Contributor(s): ______________________________________. |
| 22 |
# |
| 23 |
|
| 24 |
#= Main ==================================================================== |
| 25 |
|
| 26 |
cat <<EOF |
| 27 |
Firebird server may run in 2 different modes - super and classic. |
| 28 |
Super server provides better performance, classic - better availability. |
| 29 |
|
| 30 |
******************************************************* |
| 31 |
* This script is deprecated and will be removed soon: * |
| 32 |
* edit firebird.conf directly instead. * |
| 33 |
******************************************************* |
| 34 |
|
| 35 |
EOF |
| 36 |
|
| 37 |
AskQuestion "Which option would you like to choose: (super|classic) [super] " "super" |
| 38 |
multiAnswer=$Answer |
| 39 |
|
| 40 |
case "$multiAnswer" in |
| 41 |
s) |
| 42 |
multiAnswer=super |
| 43 |
;; |
| 44 |
c) |
| 45 |
multiAnswer=classic |
| 46 |
;; |
| 47 |
super) |
| 48 |
;; |
| 49 |
classic) |
| 50 |
;; |
| 51 |
*) |
| 52 |
echo "Unknown option $multiAnswer chosen" |
| 53 |
exit 1 |
| 54 |
;; |
| 55 |
esac |
| 56 |
|
| 57 |
echo "Stopping currently running engine..." |
| 58 |
checkIfServerRunning |
| 59 |
|
| 60 |
sc=Starting |
| 61 |
[ ${fb_install_prefix} = ${default_prefix} ] || sc=Configure |
| 62 |
echo "$sc firebird in $multiAnswer server mode..." |
| 63 |
fbconf="@FB_CONFDIR@/firebird.conf" |
| 64 |
if [ $multiAnswer = classic ]; then |
| 65 |
replaceLineInFile $fbconf "ServerMode = Classic" "^ServerMode" |
| 66 |
else |
| 67 |
replaceLineInFile $fbconf "ServerMode = Super" "^ServerMode" |
| 68 |
fi |
| 69 |
|
| 70 |
startFirebird |
| 71 |
|
| 72 |
echo "Done." |