Bugzilla – Attachment 166106 Details for
Bug 35954
Add --status to koha-plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35954: Add --status to koha-plack
Bug-35954-Add---status-to-koha-plack.patch (text/plain), 3.89 KB, created by
Martin Renvoize (ashimema)
on 2024-05-03 10:53:39 UTC
(
hide
)
Description:
Bug 35954: Add --status to koha-plack
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-03 10:53:39 UTC
Size:
3.89 KB
patch
obsolete
>From c2acf1649f804bcbe752a8942d43395fe4c07ce2 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Mon, 5 Feb 2024 08:12:29 +0000 >Subject: [PATCH] Bug 35954: Add --status to koha-plack >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > debian/docs/koha-plack.xml | 8 ++++++++ > debian/scripts/koha-plack | 22 +++++++++++++++++++++- > 2 files changed, 29 insertions(+), 1 deletion(-) > >diff --git a/debian/docs/koha-plack.xml b/debian/docs/koha-plack.xml >index 06c0309cd77..0ce060ad53d 100644 >--- a/debian/docs/koha-plack.xml >+++ b/debian/docs/koha-plack.xml >@@ -31,6 +31,7 @@ > <option>--reload</option>| > <option>--enable</option>| > <option>--disable</option>| >+ <option>--status</option>| > <option>--help</option>|<option>-h</option> > |<option>--quiet</option>|<option>-q</option> > </arg> >@@ -84,6 +85,13 @@ > </listitem> > </varlistentry> > >+ <varlistentry> >+ <term><option>--status</option></term> >+ <listitem> >+ <para>Show the status of Plack for the specified instances.</para> >+ </listitem> >+ </varlistentry> >+ > <varlistentry> > <term><option>--quiet|-q</option></term> > <listitem> >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index 6fe18602680..28f5430c72b 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -43,7 +43,7 @@ $scriptname > This script lets you manage the plack daemons for your Koha instances. > > Usage: >-$scriptname --start|--stop|--restart|--reload [--quiet|-q] instancename1 [instancename2...] >+$scriptname --start|--stop|--restart|--reload|--status [--quiet|-q] instancename1 [instancename2...] > $scriptname --enable|--disable instancename1 [instancename2] > $scriptname -h|--help > >@@ -55,6 +55,7 @@ $scriptname -h|--help > requests before restarting them > --enable Enable plack for the specified instances > --disable Disable plack for the specified instances >+ --status Show the status of Plack for the specified instances > --debugger Enable running Plack in debug mode > --debugger-key Specify the key the IDE is expecting > --debugger-location Specify the host:port for your debugger tool (defaults >@@ -192,6 +193,19 @@ reload_plack() > fi > } > >+plack_status() >+{ >+ local name=$1 >+ >+ if is_plack_running ${name}; then >+ log_daemon_msg "Plack running for ${name}" >+ log_end_msg 0 >+ else >+ log_daemon_msg "Plack not running for ${name}" >+ log_end_msg 3 >+ fi >+} >+ > enable_plack() > { > local instancename=$1 >@@ -392,6 +406,9 @@ _do_instance() { > "disable") > disable_plack $name > ;; >+ "status") >+ plack_status $name >+ ;; > *) > usage > ;; >@@ -433,6 +450,9 @@ while [ $# -gt 0 ]; do > --disable) > set_action "disable" > shift ;; >+ --status) >+ set_action "status" >+ shift ;; > --debugger) > debug_mode="yes" > shift ;; >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35954
:
161740
|
161741
|
166095
| 166106