]> git.koha-community.org Git - koha.git/commit
Bug 16974: Make koha-plack should check and fix log files permissions
authorTomas Cohen Arazi <tomascohen@unc.edu.ar>
Mon, 25 Jul 2016 18:08:00 +0000 (15:08 -0300)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 24 Aug 2016 10:27:30 +0000 (12:27 +0200)
commitf93adcc356739a7d09239a19289605e2f058407c
tree6bedb8cefe88f4863f5f477877bbd532950be33a
parent3932480d6f8529481452c03de9f0456e113834ed
Bug 16974: Make koha-plack should check and fix log files permissions

This patch adds a function to the koha-plack script so it checks for log file
existence and its permissions. This function is called from the start_plack function.

If some of this conditions are not fulfilled, it solves the situation by either
touching and/or changing the permissions accordingly for the instances' plack log files.

To test:
- Run (on kohadevbox):
  $ cd kohaclone
  $ debian/scripts/koha-plack --start kohadev
  $ debian/scripts/koha-plack --stop  kohadev
  $ ls /var/log/koha/kohadev/plack*
- Verify ownership of the created files (they might belong to the root user)
- Apply the patch
- Run:
  $ chown root:root /var/log/koha/kohadev/plack*
  $ debian/scripts/koha-plack --start kohadev
  $ ls /var/log/koha/kohadev/plack*
=> SUCCESS: Files belong to kohadev-koha:kohadev-koha
- Run:
  $ debian/scripts/koha-plack --stop  kohadev
  $ rm /var/log/koha/kohadev/plack*
  $ debian/scripts/koha-plack --start kohadev
  $ ls /var/log/koha/kohadev/plack*
=> SUCCESS: Files are created and belong to kohadev-koha:kohadev-koha
- Sign off :-D

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 007d2feee6b2fec92f2d6518a3e84de0f6476b3d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ba5ac05a140f62c6bb8383049bcfeba5c96a7de5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
debian/scripts/koha-plack