From 987ab5feca85bc19f6f67308fa7becfe791db6e2 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 11 Dec 2021 02:12:02 +0100 Subject: [PATCH] Fix malformed systemd service file. In particular, the ExecStart instruction is just wrong at the moment. Trying `python3 -um whoogle-search` throws an error because `whoogle-search` is not a module. `--host 0.0.0.0 --port 5000` is unnecesary given the defaults. I've changed it to `--host 127.0.0.1 --port 5000` because that seems more meaningful. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7b09d9..1904b69 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ pip install -r requirements.txt See the [available environment variables](#environment-variables) for additional configuration. #### systemd Configuration -After building the virtual environment, you can add the following to `/lib/systemd/system/whoogle.service` to set up a Whoogle Search systemd service: +After building the virtual environment, you can add something like the following to `/lib/systemd/system/whoogle.service` to set up a Whoogle Search systemd service: ```ini [Unit] @@ -208,7 +208,11 @@ Description=Whoogle Type=simple User= WorkingDirectory= -ExecStart=/venv/bin/python3 -um app --host 0.0.0.0 --port 5000 +# is the directory from which the +# systemd service will be launched. It doesn't really matter +ExecStart=/python3 /whoogle-search --host 127.0.0.1 --port 5000 +# For example: +# /usr/bin/python3 /home/my_username/.local/bin/whoogle-search --host 127.0.0.1 --port 5000 ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=3