Summary: | Add koha-sip script to handle SIP servers for instances | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Command-line Utilities | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, kyle, lucas, magnus, martin.renvoize, mirko, nick, pongtawat, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
To ease multi-tenant sites maintenance, several handy scripts were introduced. For handling SIP servers, 3 scripts were introduced: koha-start-sip, koha-stop-sip and koha-enable-sip.
This patch introduces a new script, koha-sip, that unifies those actions regarding SIP servers on a per instance base, through the use of option switches.
|
|
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 18114, 22235, 22396, 22397 | ||
Attachments: |
Bug 18562: Add koha-sip maintenance script
Bug 18562: Add manpage for koha-sip Bug 18562: Tab completion in bash Bug 18562: Add koha-sip maintenance script Bug 18562: Add manpage for koha-sip Bug 18562: Tab completion in bash Bug 18562: Add koha-sip maintenance script Bug 18562: Add manpage for koha-sip Bug 18562: Tab completion in bash |
Description
Tomás Cohen Arazi (tcohen)
2017-05-09 18:05:53 UTC
Created attachment 84511 [details] [review] Bug 18562: Add koha-sip maintenance script This patch introduces a single script to handle all actions on SIP servers for Koha instances. It is intended to be a replacement for: - koha-start-sip - koha-stop-sip - koha-enable-sip It adds a function called is_sip_running to koha-functions.sh. To test: - Apply this patch - Run: $ misc4dev/cp_debian_files.pl $ sudo koha-sip --enable kohadev $ sudo koha-sip --start kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --restart --verbose kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --stop kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is not running for kohadev - Play with other combinations like enabling an already enabled instance, etc. Remember you need to remove the /etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled. - Sign off :-D Created attachment 84512 [details] [review] Bug 18562: Add manpage for koha-sip This patch adds the manpage for koha-sip. To test: - Apply this patch - Run: $ kshell k$ prove xt/verify-debian-docbook.t => SUCCESS: Tests pass! - Run: $ misc4dev/cp_debian_files.pl $ man koha-sip => SUCCESS: The man page shows correctly. - Sign off :-D Created attachment 84513 [details] [review] Bug 18562: Tab completion in bash This patch adds the fancy tab completion in bash. To test: - Run: $ source debian/koha-common.bash-completion $ sudo koha-sip <tab> - Play with all the options => SUCCESS: The combinations make sense (e.g. only SIP-enabled instances are completed for --start, --stop, --restart, -v and --verbose are not offered if the other one is already in there, --enable only applies to SIP-disabled instances, etc). - Sign off :-D Created attachment 84521 [details] [review] Bug 18562: Add koha-sip maintenance script This patch introduces a single script to handle all actions on SIP servers for Koha instances. It is intended to be a replacement for: - koha-start-sip - koha-stop-sip - koha-enable-sip It adds a function called is_sip_running to koha-functions.sh. To test: - Apply this patch - Run: $ misc4dev/cp_debian_files.pl $ sudo koha-sip --enable kohadev $ sudo koha-sip --start kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --restart --verbose kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --stop kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is not running for kohadev - Play with other combinations like enabling an already enabled instance, etc. Remember you need to remove the /etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 84522 [details] [review] Bug 18562: Add manpage for koha-sip This patch adds the manpage for koha-sip. To test: - Apply this patch - Run: $ kshell k$ prove xt/verify-debian-docbook.t => SUCCESS: Tests pass! - Run: $ misc4dev/cp_debian_files.pl $ man koha-sip => SUCCESS: The man page shows correctly. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 84523 [details] [review] Bug 18562: Tab completion in bash This patch adds the fancy tab completion in bash. To test: - Run: $ source debian/koha-common.bash-completion $ sudo koha-sip <tab> - Play with all the options => SUCCESS: The combinations make sense (e.g. only SIP-enabled instances are completed for --start, --stop, --restart, -v and --verbose are not offered if the other one is already in there, --enable only applies to SIP-disabled instances, etc). - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 84951 [details] [review] Bug 18562: Add koha-sip maintenance script This patch introduces a single script to handle all actions on SIP servers for Koha instances. It is intended to be a replacement for: - koha-start-sip - koha-stop-sip - koha-enable-sip It adds a function called is_sip_running to koha-functions.sh. To test: - Apply this patch - Run: $ misc4dev/cp_debian_files.pl $ sudo koha-sip --enable kohadev $ sudo koha-sip --start kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --restart --verbose kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is running for kohadev - Run: $ sudo koha-sip --stop kohadev $ sudo koha-sip --status kohadev => SUCCESS: The SIP server is not running for kohadev - Play with other combinations like enabling an already enabled instance, etc. Remember you need to remove the /etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 84952 [details] [review] Bug 18562: Add manpage for koha-sip This patch adds the manpage for koha-sip. To test: - Apply this patch - Run: $ kshell k$ prove xt/verify-debian-docbook.t => SUCCESS: Tests pass! - Run: $ misc4dev/cp_debian_files.pl $ man koha-sip => SUCCESS: The man page shows correctly. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 84953 [details] [review] Bug 18562: Tab completion in bash This patch adds the fancy tab completion in bash. To test: - Run: $ source debian/koha-common.bash-completion $ sudo koha-sip <tab> - Play with all the options => SUCCESS: The combinations make sense (e.g. only SIP-enabled instances are completed for --start, --stop, --restart, -v and --verbose are not offered if the other one is already in there, --enable only applies to SIP-disabled instances, etc). - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice complete patch which brings consistency. Passing QA Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.03 enhancement, wont backport to 18.05.x sudo koha-sip --start --verbose kohadev [ ok ] Starting Koha Zebra daemon for kohadev:. Also, is that correct? % sudo koha-sip --restart --verbose kohadev Stopping SIP server for kohadev:. Warning: SIP server already running for kohadev:. (In reply to Jonathan Druart from comment #15) > Also, is that correct? > > % sudo koha-sip --restart --verbose kohadev > Stopping SIP server for kohadev:. > Warning: SIP server already running for kohadev:. Dealt with on bug 22396. Thanks! (In reply to Jonathan Druart from comment #14) > sudo koha-sip --start --verbose kohadev > [ ok ] Starting Koha Zebra daemon for kohadev:. Dealt with on bug 22397. Thanks! *** Bug 19962 has been marked as a duplicate of this bug. *** |