Bug 35954 - Add --status to koha-plack
Summary: Add --status to koha-plack
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Magnus Enger
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-31 07:29 UTC by Magnus Enger
Modified: 2024-05-03 17:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 35954: Add --status to koha-plack (3.75 KB, patch)
2024-02-05 08:18 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 35954: Add --status to koha-plack (3.75 KB, patch)
2024-02-05 08:19 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 35954: Add --status to koha-plack (3.82 KB, patch)
2024-05-03 08:59 UTC, HKS3 Tadeusz Sośnierz
Details | Diff | Splinter Review
Bug 35954: Add --status to koha-plack (3.89 KB, patch)
2024-05-03 10:53 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2024-01-31 07:29:59 UTC
There is already a function called is_plack_running in koha-functions.sh. 

https://git.koha-community.org/Koha-community/Koha/src/branch/master/debian/scripts/koha-functions.sh#L310
Comment 1 Magnus Enger 2024-02-05 08:18:45 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2024-02-05 08:19:18 UTC
Created attachment 161741 [details] [review]
Bug 35954: Add --status to koha-plack

This adds a --status switch to the koha-plack command.

To test on ktd:
- Copy the script to /usr/sbin, so you run the modified script,
  and not the one installed by Koha:
  $ sudo cp debian/scripts/koha-plack /usr/sbin/
- Stop and start Plack for kohadev like so:
  $ sudo koha-plack --stop kohadev
  $ sudo koha-plack --start kohadev
  And make sure this reports the correct status, both when Plack
  is running and when it is not running:
  $ sudo koha-plack --status kohadev
- Make sure --status is mentioned here:
  $ sudo koha-plack --help
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  details on how to check the manual page for the command
Comment 3 HKS3 Tadeusz Sośnierz 2024-05-03 08:59:30 UTC
Created attachment 166095 [details] [review]
Bug 35954: Add --status to koha-plack

This adds a --status switch to the koha-plack command.

To test on ktd:
- Copy the script to /usr/sbin, so you run the modified script,
  and not the one installed by Koha:
  $ sudo cp debian/scripts/koha-plack /usr/sbin/
- Stop and start Plack for kohadev like so:
  $ sudo koha-plack --stop kohadev
  $ sudo koha-plack --start kohadev
  And make sure this reports the correct status, both when Plack
  is running and when it is not running:
  $ sudo koha-plack --status kohadev
- Make sure --status is mentioned here:
  $ sudo koha-plack --help
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  details on how to check the manual page for the command

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Comment 4 Katrin Fischer 2024-05-03 10:44:25 UTC
We might want to fix the patch author:
From: root <root@localhost>
Comment 5 Martin Renvoize 2024-05-03 10:53:39 UTC
Created attachment 166106 [details] [review]
Bug 35954: Add --status to koha-plack

This adds a --status switch to the koha-plack command.

To test on ktd:
- Copy the script to /usr/sbin, so you run the modified script,
  and not the one installed by Koha:
  $ sudo cp debian/scripts/koha-plack /usr/sbin/
- Stop and start Plack for kohadev like so:
  $ sudo koha-plack --stop kohadev
  $ sudo koha-plack --start kohadev
  And make sure this reports the correct status, both when Plack
  is running and when it is not running:
  $ sudo koha-plack --status kohadev
- Make sure --status is mentioned here:
  $ sudo koha-plack --help
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  details on how to check the manual page for the command

Signed-off-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2024-05-03 10:54:00 UTC
Nice addition, Passing QA
Comment 7 Magnus Enger 2024-05-03 11:25:08 UTC
(In reply to Katrin Fischer from comment #4)
> We might want to fix the patch author:
> From: root <root@localhost>

Ooops, thanks for spotting and fixing that! :-)
Comment 8 Katrin Fischer 2024-05-03 17:32:37 UTC
Pushed for 24.05!

Well done everyone, thank you!