mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Fixed CORE-5053: changeServerMode.sh can mess with configuration
This commit is contained in:
parent
df55756907
commit
d54d2d46f8
@ -63,16 +63,16 @@ fi
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting Firebird server: "
|
||||
printf %s "Starting Firebird server: "
|
||||
start-stop-daemon --start --quiet --oknodo --chuid $FBRunUser --exec $GUARDIAN -- $FB_OPTS
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
if pidof $GUARDIAN > /dev/null; then
|
||||
echo -n "Stopping Guardian server: "
|
||||
printf %s "Stopping Guardian server: "
|
||||
start-stop-daemon --stop --quiet --oknodo --retry 10 --exec $GUARDIAN
|
||||
fi
|
||||
echo -n "Stopping Firebird server: "
|
||||
fi
|
||||
printf %s "Stopping Firebird server: "
|
||||
if [ -f $pidfile ]
|
||||
then
|
||||
kill `cat $pidfile`
|
||||
@ -85,7 +85,7 @@ case "$1" in
|
||||
RETVAL=$?
|
||||
;;
|
||||
shutdown)
|
||||
echo -n "Forcibly killing Firebird server..."
|
||||
printf %s "Forcibly killing Firebird server..."
|
||||
killall fbguard
|
||||
killall firebird
|
||||
echo "done."
|
||||
|
@ -48,12 +48,12 @@ fi
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $FULLNAME: "
|
||||
printf %s "Starting $FULLNAME: "
|
||||
echo "$GUARDIAN -pidfile $pidfile -daemon -forever" | su $FBRunUser
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $FULLNAME: "
|
||||
printf %s "Stopping $FULLNAME: "
|
||||
if [ -f $pidfile ]
|
||||
then
|
||||
kill `cat $pidfile`
|
||||
|
@ -138,13 +138,13 @@ detectDistro() {
|
||||
getInitScriptLocation() {
|
||||
if [ -f /etc/rc.d/init.d/firebird ]
|
||||
then
|
||||
echo -n /etc/rc.d/init.d/firebird
|
||||
printf %s /etc/rc.d/init.d/firebird
|
||||
elif [ -f /etc/rc.d/rc.firebird ]
|
||||
then
|
||||
echo -n /etc/rc.d/rc.firebird
|
||||
printf %s /etc/rc.d/rc.firebird
|
||||
elif [ -f /etc/init.d/firebird ]
|
||||
then
|
||||
echo -n /etc/init.d/firebird
|
||||
printf %s /etc/init.d/firebird
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ removeServiceAutostart
|
||||
|
||||
echo "Starting firebird in $multiAnswer server mode..."
|
||||
fbconf="@FB_CONFDIR@/firebird.conf"
|
||||
if [ $multiAnswer == classic ]; then
|
||||
if [ $multiAnswer = classic ]; then
|
||||
replaceLineInFile $fbconf "ServerMode = Classic" "^ServerMode"
|
||||
|
||||
updateInetdServiceEntry
|
||||
|
@ -72,7 +72,7 @@ MakeTemp() {
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "$Test"
|
||||
printf %s "$Test"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
|
||||
@ -87,8 +87,9 @@ AskQuestion() {
|
||||
# Prompt for yes or no answer - returns non-zero for no
|
||||
|
||||
AskYNQuestion() {
|
||||
while echo -n "${*} (y/n): "
|
||||
while true
|
||||
do
|
||||
printf %s "${*} (y/n): "
|
||||
read answer rest
|
||||
case $answer in
|
||||
[yY]*)
|
||||
|
Loading…
Reference in New Issue
Block a user