#!/bin/sh

# Prevent indexer jobs to run simultaneously by using a file lock
cd /srv/seeddms/seeddms/utils/
(
    if ! flock -n 3; then 
        echo "Indexer is still running"
        exit 1
    fi
    /usr/bin/php indexer.php --config /srv/seeddms/conf/settings.xml
) 3>indexer.lock
