Skip to content

Commit

Permalink
Added FORCE_REINDEX variable, forcing reindex on startup with supervi…
Browse files Browse the repository at this point in the history
…sord.
  • Loading branch information
MartinMikita committed May 26, 2016
1 parent 948977a commit f8e0459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx-reindex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! "$DOMAINS" = "" ]; then
fi

# Reindex and rotate files
if [ $REINDEX -eq 1 ]; then
if [ $REINDEX -eq 1 -o "$FORCE_REINDEX" = "yes" ]; then
mkdir -p /data/index/
/usr/bin/indexer -c /etc/sphinxsearch/sphinx.conf --rotate --all
fi
Expand Down
1 change: 1 addition & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ autorestart=false
user=root
redirect_stderr=true
priority=1
environment = FORCE_REINDEX="yes"


[program:sphinx]
Expand Down

0 comments on commit f8e0459

Please sign in to comment.