Browse Source
This patch removes traces from the (deprecated) koha-*-sip scripts. To test: - Apply the patch - Verify no traces of koha-*-sip remain on the codebase (besides Release Notes, koha-common.links and the koha-sip script): $ cd kohaclone $ git grep koha-start-sip $ git grep koha-stop-sip $ git grep koha-enable-sip => SUCCESS: No traces! - Create the following symlinks: $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-start-sip $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-stop-sip $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-enable-sip - Try the koha-*-zebra commands: $ sudo koha-stop-sip kohadev $ sudo koha-start-sip kohadev $ sudo koha-restart-sip kohadev => SUCCESS: They all work as expected! - Sign off :-D! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>19.05.x
11 changed files with 8 additions and 348 deletions
@ -1,57 +0,0 @@ |
|||
<article xmlns='http://docbook.org/ns/docbook'> |
|||
<title>koha-enable-sip</title> |
|||
<info> |
|||
<productname>Koha</productname> is the first free software library automation package. |
|||
<author> |
|||
<personname> |
|||
<firstname>Robin</firstname> |
|||
<surname>Sheat</surname> |
|||
</personname> |
|||
<affiliation> |
|||
<orgname>Catalyst IT</orgname> |
|||
<uri>http://www.catalyst.net.nz</uri> |
|||
</affiliation> |
|||
<contrib>Author</contrib> |
|||
</author> |
|||
</info> |
|||
|
|||
<refentry xml:id="koha-enable-sip"> |
|||
|
|||
<refmeta> |
|||
<refentrytitle>koha-enable-sip</refentrytitle> |
|||
<manvolnum>8</manvolnum> |
|||
</refmeta> |
|||
|
|||
<refnamediv> |
|||
<refname>koha-enable-sip</refname> |
|||
<refpurpose>Copies the SIP configuration file to allow SIP to be controlled by init scripts.</refpurpose> |
|||
<refclass>UNIX/Linux</refclass> |
|||
</refnamediv> |
|||
|
|||
<refsynopsisdiv> |
|||
<cmdsynopsis> |
|||
<command>koha-enable-sip</command> |
|||
<arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> |
|||
</cmdsynopsis> |
|||
</refsynopsisdiv> |
|||
|
|||
<refsect1><title>Description</title> |
|||
<para>This copies the default SIP configuration file /etc/koha/SIPconfig.xml to the |
|||
/etc/koha/sites/instancename directory. This allows it to be started by |
|||
<command>koha-start-sip(8)</command>, and <command>koha-stop-sip</command>. In turn, |
|||
this means that it will be started on boot and stopped on shutdown.</para> |
|||
<para>After running this, you will need to edit the newly created file to configure it |
|||
for your site.</para> |
|||
<para>To disable SIP again, delete or rename the configuration file.</para> |
|||
</refsect1> |
|||
|
|||
<refsect1><title>See also</title> |
|||
<simplelist type="inline"> |
|||
<member><command>koha-start-sip(8)</command></member> |
|||
<member><command>koha-stop-sip(8)</command></member> |
|||
</simplelist> |
|||
</refsect1> |
|||
|
|||
</refentry> |
|||
|
|||
</article> |
@ -1,53 +0,0 @@ |
|||
<article xmlns='http://docbook.org/ns/docbook'> |
|||
<title>koha-start-sip</title> |
|||
<info> |
|||
<productname>Koha</productname> is the first free software library automation package. |
|||
<author> |
|||
<personname> |
|||
<firstname>Robin</firstname> |
|||
<surname>Sheat</surname> |
|||
</personname> |
|||
<affiliation> |
|||
<orgname>Catalyst IT</orgname> |
|||
<uri>http://www.catalyst.net.nz</uri> |
|||
</affiliation> |
|||
<contrib>Author</contrib> |
|||
</author> |
|||
</info> |
|||
|
|||
<refentry xml:id="koha-start-sip"> |
|||
|
|||
<refmeta> |
|||
<refentrytitle>koha-start-sip</refentrytitle> |
|||
<manvolnum>8</manvolnum> |
|||
</refmeta> |
|||
|
|||
<refnamediv> |
|||
<refname>koha-start-sip</refname> |
|||
<refpurpose>Starts the SIP daemon for the specified Koha instances.</refpurpose> |
|||
<refclass>UNIX/Linux</refclass> |
|||
</refnamediv> |
|||
|
|||
<refsynopsisdiv> |
|||
<cmdsynopsis> |
|||
<command>koha-start-sip</command> |
|||
<arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> |
|||
</cmdsynopsis> |
|||
</refsynopsisdiv> |
|||
|
|||
<refsect1><title>Description</title> |
|||
<para>This will start the SIP daemon for the Koha instance specified by <arg>instancename</arg>.</para> |
|||
<para>If the SIP configuration is not present for the supplied instance, it will be silently skipped.</para> |
|||
<para>To enable SIP support for an instance, refer to <command>koha-enable-sip(8)</command>.</para> |
|||
</refsect1> |
|||
|
|||
<refsect1><title>See also</title> |
|||
<simplelist type="inline"> |
|||
<member><command>koha-stop-sip(8)</command></member> |
|||
<member><command>koha-enable-sip(8)</command></member> |
|||
</simplelist> |
|||
</refsect1> |
|||
|
|||
</refentry> |
|||
|
|||
</article> |
@ -1,52 +0,0 @@ |
|||
<article xmlns='http://docbook.org/ns/docbook'> |
|||
<title>koha-stop-sip</title> |
|||
<info> |
|||
<productname>Koha</productname> is the first free software library automation package. |
|||
<author> |
|||
<personname> |
|||
<firstname>Robin</firstname> |
|||
<surname>Sheat</surname> |
|||
</personname> |
|||
<affiliation> |
|||
<orgname>Catalyst IT</orgname> |
|||
<uri>http://www.catalyst.net.nz</uri> |
|||
</affiliation> |
|||
<contrib>Author</contrib> |
|||
</author> |
|||
</info> |
|||
|
|||
<refentry xml:id="koha-stop-sip"> |
|||
|
|||
<refmeta> |
|||
<refentrytitle>koha-stop-sip</refentrytitle> |
|||
<manvolnum>8</manvolnum> |
|||
</refmeta> |
|||
|
|||
<refnamediv> |
|||
<refname>koha-stop-sip</refname> |
|||
<refpurpose>Stops the SIP daemon for the specified Koha instances.</refpurpose> |
|||
<refclass>UNIX/Linux</refclass> |
|||
</refnamediv> |
|||
|
|||
<refsynopsisdiv> |
|||
<cmdsynopsis> |
|||
<command>koha-stop-sip</command> |
|||
<arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> |
|||
</cmdsynopsis> |
|||
</refsynopsisdiv> |
|||
|
|||
<refsect1><title>Description</title> |
|||
<para>This will stop the SIP daemon for the Koha instance specified by <arg>instancename</arg>.</para> |
|||
<para>If it's not running, an note will be displayed.</para> |
|||
</refsect1> |
|||
|
|||
<refsect1><title>See also</title> |
|||
<simplelist type="inline"> |
|||
<member><command>koha-start-sip(8)</command></member> |
|||
<member><command>koha-enable-sip(8)</command></member> |
|||
</simplelist> |
|||
</refsect1> |
|||
|
|||
</refentry> |
|||
|
|||
</article> |
@ -1,3 +1,6 @@ |
|||
usr/sbin/koha-zebra usr/sbin/koha-start-zebra |
|||
usr/sbin/koha-zebra usr/sbin/koha-stop-zebra |
|||
usr/sbin/koha-zebra usr/sbin/koha-restart-zebra |
|||
usr/sbin/koha-zebra usr/sbin/koha-restart-zebra |
|||
usr/sbin/koha-sip usr/sbin/koha-enable-sip |
|||
usr/sbin/koha-sip usr/sbin/koha-start-sip |
|||
usr/sbin/koha-sip usr/sbin/koha-stop-sip |
|||
|
@ -1,38 +0,0 @@ |
|||
#!/bin/sh |
|||
# |
|||
# koha-enable-sip -- Set up the config files to allow SIP to run |
|||
# Copyright 2012 Catalyst IT, Ltd |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
set -e |
|||
|
|||
for name in "$@" |
|||
do |
|||
if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; |
|||
then |
|||
echo "No such instance: ${name}" > /dev/stderr |
|||
continue; |
|||
fi |
|||
sipfile=/etc/koha/sites/${name}/SIPconfig.xml |
|||
if [ -e ${sipfile} ] |
|||
then |
|||
echo "SIP already enabled for $name" |
|||
else |
|||
echo "Enabling SIP for $name - edit ${sipfile} to configure" |
|||
cp -v /etc/koha/SIPconfig.xml ${sipfile} |
|||
chown ${name}-koha:${name}-koha ${sipfile} |
|||
chmod 600 ${sipfile} |
|||
fi |
|||
done |
@ -1,68 +0,0 @@ |
|||
#!/bin/sh |
|||
# |
|||
# koha-start-sip -- Start SIP server for named Koha instance |
|||
# Copyright 2012 Catalyst IT, Ltd |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
set -e |
|||
|
|||
# Read configuration variable file if it is present |
|||
[ -r /etc/default/koha-common ] && . /etc/default/koha-common |
|||
|
|||
# include helper functions |
|||
if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then |
|||
. "/usr/share/koha/bin/koha-functions.sh" |
|||
else |
|||
echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 |
|||
exit 1 |
|||
fi |
|||
|
|||
for name in "$@" |
|||
do |
|||
if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; |
|||
then |
|||
echo "No such instance: ${name}" > /dev/stderr |
|||
continue; |
|||
fi |
|||
[ -e /etc/koha/sites/${name}/SIPconfig.xml ] || continue |
|||
echo "Starting SIP server for $name" |
|||
mkdir -p /var/run/koha/${name} |
|||
chown "${name}-koha:${name}-koha" /var/run/koha/${name} |
|||
|
|||
adjust_paths_dev_install $name |
|||
export KOHA_CONF PERL5LIB |
|||
KOHA_CONF=/etc/koha/sites/${name}/koha-conf.xml |
|||
# PERL5LIB has been read already |
|||
if [ "$DEV_INSTALL" = "" ]; then |
|||
LIBDIR=$KOHA_HOME/lib |
|||
else |
|||
LIBDIR=$KOHA_HOME |
|||
fi |
|||
|
|||
daemon \ |
|||
--name="$name-koha-sip" \ |
|||
--errlog="/var/log/koha/$name/sip-error.log" \ |
|||
--stdout="/var/log/koha/$name/sip.log" \ |
|||
--output="/var/log/koha/$name/sip-output.log" \ |
|||
--verbose=1 \ |
|||
--respawn \ |
|||
--delay=30 \ |
|||
--pidfiles="/var/run/koha/${name}" \ |
|||
--user="$name-koha.$name-koha" \ |
|||
-- \ |
|||
perl \ |
|||
"$LIBDIR/C4/SIP/SIPServer.pm" \ |
|||
"/etc/koha/sites/${name}/SIPconfig.xml" |
|||
done |
@ -1,45 +0,0 @@ |
|||
#!/bin/sh |
|||
# |
|||
# koha-stop-sip -- Stop SIP server for named Koha instance |
|||
# Copyright 2012 Catalyst IT, Ltd |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
set -e |
|||
|
|||
for name in "$@" |
|||
do |
|||
if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; |
|||
then |
|||
echo "No such instance: ${name}" > /dev/stderr |
|||
continue; |
|||
fi |
|||
if [ ! -e /var/run/koha/${name}/${name}-koha-sip.pid ] ; |
|||
then |
|||
echo "SIP server for ${name} not running." |
|||
continue; |
|||
fi |
|||
echo "Stopping SIP server for $name" |
|||
daemon \ |
|||
--name="$name-koha-sip" \ |
|||
--errlog="/var/log/koha/$name/sip-error.log" \ |
|||
--stdout="/var/log/koha/$name/sip.log" \ |
|||
--output="/var/log/koha/$name/sip-output.log" \ |
|||
--verbose=1 \ |
|||
--respawn \ |
|||
--delay=30 \ |
|||
--pidfiles="/var/run/koha/${name}" \ |
|||
--user="$name-koha.$name-koha" \ |
|||
--stop |
|||
done |
Loading…
Reference in new issue