Updated bootstrap to check and apply for updates

This commit is contained in:
Netkas 2021-01-14 18:56:50 -05:00
parent 0041164c90
commit 13e4b7485b
1 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,20 @@ if [ ! -f /firstrun.pass ]; then
echo "[...] Restarting server in detached mode..."
else
cd /CoffeeHousePy
echo "### Checking for updates ###"
git remote update
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
BASE=$(git merge-base @ "$UPSTREAM")
if [ $LOCAL = $BASE ]; then
echo "### Applying update ###"
git pull
make clean install
fi
echo "### Starting CoffeeHouse-LangDetect ###"
make start_langdetect &
echo "### Starting CoffeeHouse-SpamDetect ###"