This prevents it leaving files lying around in /tmp
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
fi
adduser --no-create-home --disabled-login \
--gecos "Koha instance $username" \
+ --home "/var/lib/koha/$name" \
--quiet "$username"
# Create the site-specific directories.
for name in "$@"
do
- sudo -u "$name-koha" \
+ sudo -u "$name-koha" -H \
env PERL5LIB=/usr/share/koha/lib \
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a $opts
#
$|=1; # flushes output
-
+# If the cron job starts us in an unreadable dir, we will break without
+# this.
+chdir $ENV{HOME} if (!(-r '.'));
my $directory;
my $nosanitize;
my $skip_export;