mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
50 lines
992 B
Plaintext
50 lines
992 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
|
||
|
# This script is also called indirectly by the CDE dtconfig command.
|
||
|
# This file belongs in /etc/init.d where it will be run
|
||
|
# on system startup and shutdown to start the background
|
||
|
# Firebird/interbase database server daemon
|
||
|
|
||
|
mode=$1
|
||
|
|
||
|
ISC_USER=sysdba
|
||
|
ISC_PASSWORD=masterkey
|
||
|
FIREBIRD=/usr/local/firebird
|
||
|
RUN_USER=firebird
|
||
|
|
||
|
export ISC_USER ISC_PASSWORD FIREBIRD
|
||
|
|
||
|
usage_error() {
|
||
|
echo " $0 start (start Firebird SS server process)"
|
||
|
echo " $0 stop (stop Firebird SS server process)"
|
||
|
echo " "
|
||
|
}
|
||
|
|
||
|
if [ ! -d /usr/local/firebird ]
|
||
|
then
|
||
|
echo "Firebird SS directory /usr/local/firebird does not exist!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
case "$mode" in
|
||
|
|
||
|
'start')
|
||
|
echo "trying to start Firebird SS Server.."
|
||
|
/usr/bin/su - $RUN_USER -c "$FIREBIRD/bin/fbmgr -start -forever"
|
||
|
;;
|
||
|
|
||
|
'stop')
|
||
|
echo "trying to stop Firebird SS Server.."
|
||
|
su - $RUN_USER -c "$FIREBIRD/bin/fbmgr -shut -user $ISC_USER -pass $ISC_PASSWORD"
|
||
|
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
usage_error
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|