| Summary: | PID is created in /tmp/ instead of in /var/run/koha/... | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Attila Kinali <attila> |
| Component: | Packaging | Assignee: | Bugs List <koha-bugs> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | trivial | ||
| Priority: | P5 - low | CC: | chris, robin, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | Linux | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
patch
Bug 13896: Fix pid file creation, use proper directory instead of /tmp/ [PASSED QA] Bug 13896: Fix pid file creation, use proper directory instead of /tmp/ Bug 13896: (QA followup) fix koha-{stop|restart}-zebra too |
||
Created attachment 37164 [details] [review] patch Add patch file as requested by cait Created attachment 37434 [details] [review] Bug 13896: Fix pid file creation, use proper directory instead of /tmp/ daemon uses by default /tmp/ for pid files, if they are unspecified. Pass the right directory to daemon, so it knows where to put the pid file. Signed-off-by: Attila Kinali <attila@kinali.ch> TEST PLAN --------- 1) Roll a distribution and confirm it works. OR 1) Hack all the /var directories to point to git directories 2) Add a dummy user for the instance name 3) sudo the script with the faked instance name. -- the daemon should be running and the pid file should be in the expected directory. The first way is the proper way to test, I did the latter. :) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 37460 [details] [review] [PASSED QA] Bug 13896: Fix pid file creation, use proper directory instead of /tmp/ daemon uses by default /tmp/ for pid files, if they are unspecified. Pass the right directory to daemon, so it knows where to put the pid file. Signed-off-by: Attila Kinali <attila@kinali.ch> TEST PLAN --------- 1) Roll a distribution and confirm it works. OR 1) Hack all the /var directories to point to git directories 2) Add a dummy user for the instance name 3) sudo the script with the faked instance name. -- the daemon should be running and the pid file should be in the expected directory. The first way is the proper way to test, I did the latter. :) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 37589 [details] [review] Bug 13896: (QA followup) fix koha-{stop|restart}-zebra too Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Patch pushed to master. Thanks Attila! Congratulations for your patch! Pushed to 3.18.x will be in 3.18.6 |
The daemon command uses /tmp/ as default directory for creating pid files unless the directory has been specified explicitly. This affects only the debian start scripts. The following patch fixes this --- a/debian/scripts/koha-start-zebra +++ b/debian/scripts/koha-start-zebra @@ -40,6 +40,7 @@ start_zebra_instance() "/var/log/koha/$instancename/zebra-output.log" daemon \ --name="$instancename-koha-zebra" \ + --pidfiles="/var/run/koha/$instancename/" \ --errlog="/var/log/koha/$instancename/zebra-error.log" \ --stdout="/var/log/koha/$instancename/zebra.log" \ --output="/var/log/koha/$instancename/zebra-output.log" \