Use LD_PRELOAD for indexer cron job
This commit is contained in:
parent
f21753c8b3
commit
95ed6c16df
@ -1,15 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "${SEEDDMS_HOME}" ]; then
|
if [ -z "${SEEDDMS_HOME}" ]; then
|
||||||
parentdir=$(dirname "$0")
|
parentdir=$(dirname "$0")
|
||||||
export SEEDDMS_HOME=$(dirname "$parentdir")
|
export SEEDDMS_HOME=$(dirname "$parentdir")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prevent indexer jobs to run simultaneously by using a file lock
|
# Prevent indexer jobs to run simultaneously by using a file lock
|
||||||
(
|
(
|
||||||
if ! flock -n 3; then
|
if ! flock -n 3; then
|
||||||
echo "Previous indexer job is still running"
|
echo "Previous indexer job is still running" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
export LD_PRELOAD=/usr/lib/preloadable_libiconv.so
|
||||||
php -f "${SEEDDMS_HOME}/utils/indexer.php" -- "${@}"
|
php -f "${SEEDDMS_HOME}/utils/indexer.php" -- "${@}"
|
||||||
) 3>/srv/seeddms/indexer.lock
|
) 3>/srv/seeddms/indexer.lock
|
||||||
|
Loading…
Reference in New Issue
Block a user