Only do an full elasticsearch indexing if the skip file is not present.
This commit is contained in:
parent
ebca3beba6
commit
e76c71ab48
@ -1,7 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
pgrep -af fulltextsearch | grep -qv grep || { su -c "php /var/www/html/occ fulltextsearch:index -q" -s "/bin/bash" www-data; }
|
||||
pgrep -af fulltextsearch | grep -qv grep || nohup su -c "php /var/www/html/occ fulltextsearch:live -q" -s "/bin/bash" www-data &>/dev/null &
|
||||
STATEFILE=/var/www/html/.skip_elasticsearch_indexing
|
||||
pgrep -af fulltextsearch | grep -qv grep
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
if ! test -f $STATEFILE
|
||||
then
|
||||
su -c "php /var/www/html/occ fulltextsearch:index -q" -s "/bin/bash" www-data
|
||||
touch $STATEFILE
|
||||
fi
|
||||
nohup su -c "php /var/www/html/occ fulltextsearch:live -q" -s "/bin/bash" www-data &>/dev/null &
|
||||
fi
|
||||
|
||||
trap "{ echo EXITING; pkill -f -SIGTERM 'fulltextsearch'; }" SIGKILL SIGTERM
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user