@ -1,7 +1,7 @@
#!/bin/ba sh
#!/bin/sh
# This file is part of Koha.
#
# Copyright (C) 2017 Catalyst IT
# Copyright (C) 2019 Catalyst IT
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -16,30 +16,25 @@
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
set -e
. /lib/lsb/init-functions
# 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
passengerpid = "/var/local/coce/passenger.8080.pid"
if [ ! -f " $passengerpid " ] ; then
echo " PID file ( $passengerpid ) does not exist "
cd /var/local/coce
passenger start --port 8080 --daemonize
fi
if !` sudo koha-passenger` ; then
` cd /var/local/coce`
` sudo passenger start --port 8080 --daemonize`
PID = ` cat $passengerpid `
if ps -p $PID > /dev/null; then
echo "Passnger is running - do nothing"
else
` cd /var/local/coce`
` sudo passenger start --port 8080 --daemonize`
cd /var/local/coce
passenger start --port 8080 --daemonize
fi
if !` sudo koha-passenger` ; then
if [ ! -f " $passengerpid " ] ; then
warn "The passenger instance is not running"
elif ps -p $PID > /dev/null; then
warn "The passenger instance is now running"
else
warn "The passenger instance is not running"