searxng-app/start.sh

17 lines
441 B
Bash
Raw Normal View History

2017-03-09 11:29:33 +00:00
#!/bin/bash
2019-07-16 19:30:21 +00:00
set -eu
2017-03-09 11:29:33 +00:00
if [[ -z "$(ls -A /app/data)" ]]; then
echo "=> Detected first run"
cp /app/code/searx/settings.yml.orig /app/data/settings.yml
2019-07-16 19:39:16 +00:00
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
2017-03-09 11:29:33 +00:00
fi
2017-03-11 03:32:08 +00:00
chown -R www-data.www-data /app/data
2019-07-16 19:30:21 +00:00
echo "==> Starting searx"
exec gosu www-data python3 /app/code/searx/webapp.py