Improve init script to work with opensuse and fix logic with PID file

Description

The redhat init script is incorrect and does not work with OpenSUSE under systemd. Looking into it, I found that the problem is that the pidfile is not persistent - it is only created upon shutdown and then immediately removed, as a foil for kill proc.

I submitted a patch through the opensuse build system that fixes this problem - it probably should be rolled upstream. The opensuse build request is at https://build.opensuse.org/request/show/223463. I'm not providing a diff here because the diff in the opensuse build file is predicated upon a couple of additional patches. But here is the init script I'm using. It works correctly on opensuse, and should not work incorrectly anywhere else, either.

arguably status() should be a little smarter in checking the pidfile to see if it matches the running process (if there is one), and start() should be a little smarter in checking for an existing pidfile, but I don't have the time to make it completely buttoned down for now...

Environment

None

Activity

Show:
Daryl Herzmann
March 7, 2014, 9:28 PM

r13985

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Daryl Herzmann

Reporter

Daryl Herzmann