Marcel de Rooy
08ece513cd
This patch makes the following changes: koha-foreach, koha-upgrade-schema (shell scripts): [1] Read default file [2] Include helper functions [3] Add call to adjust_paths_dev_install [4] Replace hardcoded path by $PERL5LIB koha-shell (perl script): [1] Remove hardcoded lib path [2] Add a sub that reads PERL5LIB from default or koha-conf, just as the shell scripts do. koha-plack (shell script), plack.psgi: [1] Add call to adjust_paths_dev_install [2] Remove hardcoded lib path [3] Add installer path to PERL5LIB, remove it from plack.pgsi koha-sitemap (shell script): [1] Add call to adjust_paths_dev_install [2] Remove hardcoded lib path [3] Add installer path to PERL5LIB [4] Adjust path for call to sitemap cron job koha-start-sip (shell script): [1] Read default file [2] Include helper functions [3] Add call to adjust_paths_dev_install [4] Adjust path to C4/SIP koha-stop-sip (shell script): [1] Remove KOHA_CONF and PERL5LIB (not needed to stop the daemon) [2] Same for paths in daemon client options NOTE: Script debian/scripts/koha-upgrade-to-3.4 has been left out intentionally. Test plan: [1] Regular install: Run koha-foreach echo Hi Run koha-upgrade-schema yourinstance Run koha-shell yourinstance If you have plack, run koha-plack --start|--stop yourinstance Run koha-sitemap --generate yourinstance Run koha-start-sip yourinstance Run koha-stop-sip yourinstance [2] Dev install [yourinstance] with <dev_install> in koha-conf.xml: Run koha-upgrade-schema yourinstance Run koha-shell yourinstance If you have plack: koha-plack --start|--stop yourinstance Run koha-sitemap --generate yourinstance Run koha-start-sip yourinstance Run koha-stop-sip yourinstance [3] Git grep on koha/lib You should no longer see occurrences in debian/scripts except: koha-translate: see report 16749 koha-upgrade-to-3.4: left out intentionally [4] Git grep on koha/bin You should only see hits for lines with koha-functions in the debian scripts except: koha-upgrade-to-3.4: left out intentionally Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Most scripts tested on Wheezy (although it would not matter much). Plack script tested on Jessie. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
45 lines
1.4 KiB
Bash
Executable file
45 lines
1.4 KiB
Bash
Executable file
#!/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
|