working searx-docker.service

This commit is contained in:
Dalf 2019-07-11 17:12:54 +02:00
parent 86f1f7e22d
commit 518650fc80
4 changed files with 10 additions and 7 deletions

View file

@ -1,4 +1,4 @@
<[Unit]
[Unit]
Description=searx service
Requires=docker.service
After=docker.service
@ -6,12 +6,11 @@ After=docker.service
[Service]
Restart=always
Environment=SEARX_DIR=/usr/local/searx-docker
Environment=SEARX_DOCKERCOMPOSEFILE=docker-compose.yaml
WorkingDirectory=/usr/local/searx-docker
ExecStart=/bin/sh -c "start.sh"
ExecStop=/bin/sh -c "stop.sh"
ExecStart=/bin/sh -c "${SEARX_DIR}/start.sh"
ExecStop=/bin/sh -c "${SEARX_DIR}/stop.sh"
[Install]
WantedBy=multi-user.target

View file

@ -1,5 +1,8 @@
#!/bin/sh
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
cd -- "$BASE_DIR"
. ./util.sh
if grep -q "MORTY_KEY=RemplaceWithARealKey!" .env; then

View file

@ -1,5 +1,8 @@
#!/bin/sh
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
cd -- "$BASE_DIR"
. ./util.sh
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v

View file

@ -1,5 +1,3 @@
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
cd -- "$BASE_DIR"
set -e
DOCKERCOMPOSE=$(which docker-compose || echo "/usr/local/bin/docker-compose")