Update systemd instructions [skip ci] (#571)

main
Nuño Sempere 2021-12-19 19:52:15 +01:00 committed by GitHub
parent c637eb28dd
commit f6c0843183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -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]
@ -207,8 +207,14 @@ Description=Whoogle
#Environment=WHOOGLE_DOTENV=1
Type=simple
User=<username>
WorkingDirectory=<whoogle_directory>
ExecStart=<whoogle_directory>/venv/bin/python3 -um app --host 0.0.0.0 --port 5000
# If installed as a package, add:
ExecStart=<python_install_dir>/python3 <whoogle_install_dir>/whoogle-search --host 127.0.0.1 --port 5000
# For example:
# ExecStart=/usr/bin/python3 /home/my_username/.local/bin/whoogle-search --host 127.0.0.1 --port 5000
# Otherwise if running the app from source, add:
ExecStart=<whoogle_repo_dir>/run
# For example:
# ExecStart=/var/www/whoogle-search/run
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3