1#!/bin/sh
2
3PATH_TO_PLUGIN_DIRECTORY=/var/www/grimore.org/lib/plugins/sphinxsearch
4
5LOCK_FILE="/var/lock/$0"
6if mkdir "$LOCK_FILE" 2>&1 >/dev/null; then
7    trap '{ rm -rf $LOCK_FILE; }' KILL QUIT TERM EXIT INT HUP
8else
9    exit 0
10fi
11
12cd $PATH_TO_PLUGIN_DIRECTORY
13
14/usr/bin/indexer -c sphinx.conf dk_main --rotate 2>&1 >/dev/null
15