working searx-docker.service
This commit is contained in:
parent
86f1f7e22d
commit
518650fc80
4 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
<[Unit]
|
[Unit]
|
||||||
Description=searx service
|
Description=searx service
|
||||||
Requires=docker.service
|
Requires=docker.service
|
||||||
After=docker.service
|
After=docker.service
|
||||||
|
@ -6,12 +6,11 @@ After=docker.service
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
Environment=SEARX_DIR=/usr/local/searx-docker
|
||||||
Environment=SEARX_DOCKERCOMPOSEFILE=docker-compose.yaml
|
Environment=SEARX_DOCKERCOMPOSEFILE=docker-compose.yaml
|
||||||
|
|
||||||
WorkingDirectory=/usr/local/searx-docker
|
ExecStart=/bin/sh -c "${SEARX_DIR}/start.sh"
|
||||||
|
ExecStop=/bin/sh -c "${SEARX_DIR}/stop.sh"
|
||||||
ExecStart=/bin/sh -c "start.sh"
|
|
||||||
ExecStop=/bin/sh -c "stop.sh"
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
3
start.sh
3
start.sh
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
|
||||||
|
cd -- "$BASE_DIR"
|
||||||
|
|
||||||
. ./util.sh
|
. ./util.sh
|
||||||
|
|
||||||
if grep -q "MORTY_KEY=RemplaceWithARealKey!" .env; then
|
if grep -q "MORTY_KEY=RemplaceWithARealKey!" .env; then
|
||||||
|
|
3
stop.sh
3
stop.sh
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
|
||||||
|
cd -- "$BASE_DIR"
|
||||||
|
|
||||||
. ./util.sh
|
. ./util.sh
|
||||||
|
|
||||||
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v
|
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v
|
||||||
|
|
2
util.sh
2
util.sh
|
@ -1,5 +1,3 @@
|
||||||
BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
|
|
||||||
cd -- "$BASE_DIR"
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DOCKERCOMPOSE=$(which docker-compose || echo "/usr/local/bin/docker-compose")
|
DOCKERCOMPOSE=$(which docker-compose || echo "/usr/local/bin/docker-compose")
|
||||||
|
|
Loading…
Reference in a new issue