8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 08:03:04 +01:00

Fix up Linux scripts

This commit is contained in:
skidder 2003-04-15 15:26:33 +00:00
parent 64c8ed0dfe
commit a518960783
7 changed files with 51 additions and 51 deletions

View File

@ -44,7 +44,7 @@ checkIfServerRunning() {
# Check is server is being actively used.
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -53,7 +53,7 @@ checkIfServerRunning() {
exit 1
fi
checkString=`ps -efww| egrep "(gds_inet_server|gds_pipe)" |grep -v grep`
checkString=`ps -efww| egrep "(fb_inet_server|gds_pipe)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -66,7 +66,7 @@ checkIfServerRunning() {
# Stop lock manager if it is the only thing running.
for i in `ps -efww | grep "gds_lock_mgr" | grep -v "grep" | awk '{print $2}' `
for i in `ps -efww | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
do
kill $i
done
@ -165,7 +165,7 @@ EOF
updateInetdEntry() {
FileName=/etc/inetd.conf
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/gds_inet_server gds_inet_server # InterBase Database Remote Server"
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/fb_inet_server fb_inet_server # InterBase Database Remote Server"
oldLine=`grep "^gds_db" $FileName`
replaceLineInFile "$FileName" "$newLine" "$oldLine"
@ -243,7 +243,7 @@ fixFilePermissions() {
# SUID is still needed for group direct access. General users
# cannot run though.
for i in gds_lock_mgr gds_drop gds_inet_server
for i in fb_lock_mgr gds_drop fb_inet_server
do
chmod ug=rx,o= $i
chmod ug+s $i
@ -260,9 +260,9 @@ fixFilePermissions() {
done
chmod ug=rw,o= interbase.log
chmod ug=rw,o= firebird.log
chmod a=r interbase.msg
chmod a=r firebird.msg
chmod ug=rw,o= help/help.fdb
chmod ug=rw,o= security.fdb
@ -277,7 +277,7 @@ fixFilePermissions() {
done
# make examples db's writable by group
chmod ug=rw,o= *.gdb
chmod ug=rw,o= *.fdb
}
@ -304,7 +304,7 @@ resetInetdServer() {
#= Main Program ============================================================
IBRootDir=/opt/interbase
IBRootDir=/usr/local/firebird
IBBin=$IBRootDir/bin
@ -362,11 +362,11 @@ resetInetdServer
cd $IBRootDir
touch interbase.log
chmod ug=rw,o= interbase.log
touch firebird.log
chmod ug=rw,o= firebird.log
# make examples writable by group
chmod ug=rw,o= examples/*.gdb
chmod ug=rw,o= examples/*.fdb
echo "Completed."

View File

@ -44,7 +44,7 @@ checkIfServerRunning() {
# Check is server is being actively used.
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -53,7 +53,7 @@ checkIfServerRunning() {
exit 1
fi
checkString=`ps -efww| egrep "(gds_inet_server|gds_pipe)" |grep -v grep`
checkString=`ps -efww| egrep "(fb_inet_server|gds_pipe)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -66,7 +66,7 @@ checkIfServerRunning() {
# Stop lock manager if it is the only thing running.
for i in `ps -efww | grep "gds_lock_mgr" | grep -v "grep" | awk '{print $2}' `
for i in `ps -efww | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
do
kill $i
done
@ -155,7 +155,7 @@ EOF
updateInetdEntry() {
FileName=/etc/inetd.conf
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/gds_inet_server gds_inet_server # InterBase Database Remote Server"
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/fb_inet_server fb_inet_server # InterBase Database Remote Server"
oldLine=`grep "^gds_db" $FileName`
replaceLineInFile "$FileName" "$newLine" "$oldLine"
@ -211,7 +211,7 @@ resetInetdServer() {
#== Main Start ==============================================================
IBRootDir=/opt/interbase
IBRootDir=/usr/local/firebird
IBBin=$IBRootDir/bin
@ -247,7 +247,7 @@ echo "Updating /etc/services file"
FileName=/etc/inetd.conf
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/gds_inet_server gds_inet_server # InterBase Database Remote Server"
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/fb_inet_server fb_inet_server # InterBase Database Remote Server"
oldLine=`grep "^gds_db" $FileName`
replaceLineInFile "$FileName" "$newLine" "$oldLine"
@ -284,7 +284,7 @@ chmod o=rx *
# SUID is needed for running server programs.
for i in gds_lock_mgr gds_drop gds_inet_server
for i in fb_lock_mgr gds_drop fb_inet_server
do
chmod ug+s $i
done
@ -305,13 +305,13 @@ for i in isc_init1 isc_lock1 isc_event1
done
touch interbase.log
chmod ugo=rw interbase.log
touch firebird.log
chmod ugo=rw firebird.log
# make databases writable by all
chmod ugo=rw examples/*.gdb
chmod ugo=rw help/*.gdb
chmod ugo=rw examples/*.fdb
chmod ugo=rw help/*.fdb
chmod ugo=rw security.fdb

View File

@ -43,7 +43,7 @@ checkInstallUser() {
stopServerIfRunning() {
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -64,7 +64,7 @@ checkIfServerRunning() {
# Check is server is being actively used.
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -73,7 +73,7 @@ checkIfServerRunning() {
exit 1
fi
checkString=`ps -efww| egrep "(gds_inet_server|gds_pipe)" |grep -v grep`
checkString=`ps -efww| egrep "(fb_inet_server|gds_pipe)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -86,7 +86,7 @@ checkIfServerRunning() {
# Stop lock manager if it is the only thing running.
for i in `ps -efww | grep "gds_lock_mgr" | grep -v "grep" | awk '{print $2}' `
for i in `ps -efww | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
do
kill $i
done
@ -173,7 +173,7 @@ EOF
}
IBRootDir=/opt/interbase
IBRootDir=/usr/local/firebird
IBBin=$IBRootDir/bin
@ -250,13 +250,13 @@ chmod o=rx qli
cd $IBRootDir
touch interbase.log
chmod ug=rw,o= interbase.log
chmod ug=rw,o=r interbase.msg
touch firebird.log
chmod ug=rw,o= firebird.log
chmod ug=rw,o=r firebird.msg
# make examples writable by group
chmod ug=rw,o= examples/*.gdb
chmod ug=rw,o= examples/*.fdb
changeInitRunUser $RunUser

View File

@ -43,7 +43,7 @@ checkInstallUser() {
stopServerIfRunning() {
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fbserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -64,7 +64,7 @@ checkIfServerRunning() {
# Check is server is being actively used.
checkString=`ps -efww| egrep "(ibserver|ibguard)" |grep -v grep`
checkString=`ps -efww| egrep "(fserver|fbguard)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -73,7 +73,7 @@ checkIfServerRunning() {
exit 1
fi
checkString=`ps -efww| egrep "(gds_inet_server|gds_pipe)" |grep -v grep`
checkString=`ps -efww| egrep "(fb_inet_server|gds_pipe)" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -86,7 +86,7 @@ checkIfServerRunning() {
# Stop lock manager if it is the only thing running.
for i in `ps -efww | grep "gds_lock_mgr" | grep -v "grep" | awk '{print $2}' `
for i in `ps -efww | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
do
kill $i
done
@ -173,7 +173,7 @@ EOF
}
IBRootDir=/opt/interbase
IBRootDir=/usr/local/firebird
IBBin=$IBRootDir/bin
@ -240,12 +240,12 @@ chmod o=rx qli
cd $IBRootDir
touch interbase.log
chmod ug=rw,o= interbase.log
touch firebird.log
chmod ug=rw,o= firebird.log
# make examples writable by group
chmod ug=rw,o= examples/*.gdb
chmod ug=rw,o= examples/*.fdb
changeInitRunUser $RunUser

View File

@ -54,9 +54,9 @@ generateNewDBAPassword() {
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo "Your password can be changed to a more suitable one using the" >> $DBAPasswordFile
echo "/opt/interbase/bin/gsec program as show below:" >> $DBAPasswordFile
echo "/usr/local/firebird/bin/gsec program as show below:" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo ">cd /opt/interbase" >> $DBAPasswordFile
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
echo "GSEC>quit" >> $DBAPasswordFile

View File

@ -9,7 +9,7 @@
: ${INTERBASE:=/opt/interbase}
: ${INTERBASE:=/usr/local/firebird}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
: ${FBRunUser:=root}
@ -26,7 +26,7 @@ export ISC_PASSWORD
# Check the file is there and is executable.
[ -x $INTERBASE/bin/ibmgr ] || exit 0
[ -x $INTERBASE/bin/fbmgr ] || exit 0
@ -34,12 +34,12 @@ export ISC_PASSWORD
case "$1" in
start)
echo -n "Starting Firebird server: "
echo '$INTERBASE/bin/ibmgr -start -forever' | su $FBRunUser
echo '$INTERBASE/bin/fbmgr -start -forever' | su $FBRunUser
RETVAL=$?
;;
stop)
echo -n "Stopping Firebird server: "
$INTERBASE/bin/ibmgr -shut
$INTERBASE/bin/fbmgr -shut
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
;;

View File

@ -15,7 +15,7 @@
. /etc/rc.d/init.d/functions
: ${INTERBASE:=/opt/interbase}
: ${INTERBASE:=/usr/local/firebird}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
: ${FBRunUser:=root}
@ -32,7 +32,7 @@ export ISC_PASSWORD
# Check the file is there and is executable.
[ -x $INTERBASE/bin/ibmgr ] || exit 0
[ -x $INTERBASE/bin/fbmgr ] || exit 0
@ -40,20 +40,20 @@ export ISC_PASSWORD
case "$1" in
start)
echo -n "Starting Firebird server: "
daemon --user $FBRunUser $INTERBASE/bin/ibmgr -start -forever
daemon --user $FBRunUser $INTERBASE/bin/fbmgr -start -forever
# echo '$INTERBASE/bin/ibmgr -start -forever' | su $FBRunUser
RETVAL=$?
;;
stop)
echo -n "Stopping Firebird server: "
$INTERBASE/bin/ibmgr -shut
$INTERBASE/bin/fbmgr -shut
# killproc ibserver
RETVAL=$?
# echo
# [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
;;
status)
status ibserver
status fbserver
RETVAL=$?
;;
restart|reload)