Bugzilla – Attachment 161740 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.75 KB, created by
Magnus Enger
on 2024-02-05 08:18:45 UTC
(
hide
)
Description:
Bug 35954: Add --status to koha-plack
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2024-02-05 08:18:45 UTC
Size:
3.75 KB
patch
obsolete
>From 55059ab2084d7047ab547318ecfff693f99124b5 Mon Sep 17 00:00:00 2001 >From: root <root@localhost> >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 >--- > 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 06c0309cd7..0ce060ad53 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 6fe1860268..28f5430c72 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.34.1
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