Issue Details (XML | Word | Printable)

Key: CORE-1589
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alexander Peshkov
Reporter: Emil Totev
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Start-stop script for superserver on Linux does not always stop service

Created: 13/Nov/07 07:28 AM   Updated: 26/Dec/07 01:11 PM
Component/s: Installation
Affects Version/s: 2.0.3, 2.1 Beta 2
Fix Version/s: 2.1 RC1

Time Tracking:
Not Specified

File Attachments: 1. File firebird (2 kB)

Environment: Linux (CentOS based, but should be the same for other distros)


 Description  « Hide
The script in /etc/init.d/firebird is not able to stop the firebird superserver service when it has been started at system startup.
This is because the name of the pidfile is generated using `basename $0`, but the script also exists with a different name in the rcn.d directories.

Also the script doesn't show any indication for failure / success. The script is supposed to support multiple firebird instances, but `service status firebird` will show the pids of all the running fbservers regardless of the service name.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emil Totev added a comment - 19/Nov/07 04:15 AM
This is a working start-stop script for Firebird 2 superserver on linux, supporting multiple firebird instances. It is tested on CentOS 4 based system and uses several simple RedHat specific functions.

Alexander Peshkov added a comment - 19/Nov/07 07:52 AM
Emil, what were the reasons to replace:
1) daemon with runuser
2) fbmgr with fbmgr.bin
?

Emil Totev added a comment - 19/Nov/07 03:16 PM
I had to use fbmgr.bin, because fbmgr is a shell script overriding $FIREBIRD with the default /opt/firebird and then starting fbmgr.bin.

Similarly, on my system 'daemon' somehow doesn't pass the environment properly, so it still looks for /opt/firebird. Apart from the numerous checks, my 'daemon' is starting the service effectively with

initlog -c "runuser -s /bin/bash - $user -c \"$*\""

I assumed that initlog is the guilty one and tried without it - and it worked.

You can also contact me directly if I can be of more help

Alexander Peshkov added a comment - 03/Dec/07 11:15 AM
Patch is commited, same changes are done in start scripts (generic, slackware, gentoo) I could test myself.