Lines 20-26
Link Here
|
20 |
set -e |
20 |
set -e |
21 |
|
21 |
|
22 |
# include helper functions |
22 |
# include helper functions |
23 |
if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then |
23 |
scriptdir=$(dirname "$0") |
|
|
24 |
if [ -f $scriptdir/koha-functions.sh ]; then |
25 |
. "$scriptdir/koha-functions.sh" |
26 |
elif [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then |
24 |
. "/usr/share/koha/bin/koha-functions.sh" |
27 |
. "/usr/share/koha/bin/koha-functions.sh" |
25 |
else |
28 |
else |
26 |
echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 |
29 |
echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 |
Lines 49-60
run_rebuild_zebra()
Link Here
|
49 |
{ |
52 |
{ |
50 |
local instancename=$1; shift |
53 |
local instancename=$1; shift |
51 |
|
54 |
|
|
|
55 |
# If we 'gitified' a Koha instance, point to adjusted locations |
56 |
local libpath=$(get_perl5lib $instancename) |
57 |
local rebuild |
58 |
if is_gitified $instancename; then |
59 |
rebuild="$libpath/misc" |
60 |
else |
61 |
rebuild="/usr/share/koha/bin" |
62 |
fi |
63 |
|
52 |
# TODO: This comment is here to remind us that we should make |
64 |
# TODO: This comment is here to remind us that we should make |
53 |
# rebuild_zebra.pl return error codes on failure |
65 |
# rebuild_zebra.pl return error codes on failure |
54 |
if sudo -u "$instancename-koha" -H \ |
66 |
if sudo -u "$instancename-koha" -H \ |
55 |
env PERL5LIB=/usr/share/koha/lib \ |
67 |
env PERL5LIB=$libpath \ |
56 |
KOHA_CONF="/etc/koha/sites/$instancename/koha-conf.xml" \ |
68 |
KOHA_CONF="/etc/koha/sites/$instancename/koha-conf.xml" \ |
57 |
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl $@ ; then |
69 |
$rebuild/migration_tools/rebuild_zebra.pl $@ ; then |
58 |
return 0 |
70 |
return 0 |
59 |
else |
71 |
else |
60 |
return 1 |
72 |
return 1 |
61 |
- |
|
|