searxng-app/start.sh
2020-03-04 14:52:32 +00:00

16 lines
441 B
Bash
Executable file

#!/bin/bash
set -eu
if [[ -z "$(ls -A /app/data)" ]]; then
echo "=> Detected first run"
cp /app/code/searx/settings.yml.orig /app/data/settings.yml
sed -e 's/bind_address : "127.0.0.1"/bind_address : "0.0.0.0"/g' \
-e "s/ultrasecretkey/`openssl rand -hex 16`/g" \
-i /app/data/settings.yml
fi
chown -R www-data.www-data /app/data
echo "==> Starting searx"
exec gosu www-data python3 /app/code/searx/webapp.py