Minor bug fixed, minor changes

This commit is contained in:
Dalf 2019-07-13 13:28:18 +02:00
parent cfc03dc78c
commit 3878f0d51a
5 changed files with 17 additions and 19 deletions

4
.env
View file

@ -1,5 +1,7 @@
# hostname and protocol (empty except for localhost, set to "https://") # hostname
SEARX_HOSTNAME=localhost SEARX_HOSTNAME=localhost
# comment both if SEARX_HOSTNAME is NOT localhost
SEARX_PROTOCOL=https:// SEARX_PROTOCOL=https://
SEARX_TLS=self_signed SEARX_TLS=self_signed

5
.gitignore vendored
View file

@ -1 +1,6 @@
*~ *~
searx-docker.service
caddy
srv
searx

View file

@ -5,20 +5,6 @@ cd -- "$BASE_DIR"
. ./util.sh . ./util.sh
if grep -q "MORTY_KEY=RemplaceWithARealKey!" .env; then
echo "In the .env file, you must configure MORTY_KEY" 1>&2
CANT_START=1
fi
if grep -q "FILTRON_PASSWORD=password" .env; then
echo "In the .env file, you must configure FILTRON_PASSWORD" 1>&2
CANT_START=1
fi
if [ $CANT_START ]; then
exit 1
fi
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v $DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE rm -fv $DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE rm -fv
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE up $DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE up

View file

@ -4,18 +4,18 @@
SERVICE_NAME="searx-docker.service" SERVICE_NAME="searx-docker.service"
if [ ! -x "${which systemctl}" ]; then if [ ! -x "$(which systemctl)" ]; then
echo "systemctl not found" 1>&2 echo "systemctl not found" 1>&2
exit 1 exit 1
fi fi
if [ ! -x "${which git}" ]; then if [ ! -x "$(which git)" ]; then
echo "git not found" 1>&2 echo "git not found" 1>&2
exit 1 exit 1
fi fi
# stop the systemd service # stop the systemd service
systemctl stop searx-docker.service systemctl stop "${SERVICE_NAME}"
# update, change to 'git pull --rebase --autostash origin master' at your own risk # update, change to 'git pull --rebase --autostash origin master' at your own risk
git pull --ff-only --autostash origin master git pull --ff-only --autostash origin master
@ -32,4 +32,4 @@ else
fi fi
# let the user see # let the user see
echo "Use\nsystemctl start searx-docker.service\nto restart searx" echo "Use\nsystemctl start \"${SERVICE_NAME}\"\nto restart searx"

View file

@ -24,3 +24,8 @@ if [ ! -f "${DOCKERCOMPOSEFILE}" ]; then
echo "${DOCKERCOMPOSEFILE} not found" 1>&2 echo "${DOCKERCOMPOSEFILE} not found" 1>&2
exit 1 exit 1
fi fi
if [ -x $(git diff --name-only | grep .env) ]; then
echo "The .env must be changed" 1>&2
exit 1
fi