From 46b6c66312ced2e3867ea0c70a998dd8dd580800 Mon Sep 17 00:00:00 2001 From: thomcatdotrocks <37344783+thomcatdotrocks@users.noreply.github.com> Date: Fri, 15 May 2020 18:04:01 -0500 Subject: [PATCH] Added instructions for running with systemd (#45) Co-authored-by: ThomCat --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index d63450f..b64df24 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,33 @@ pip install -r requirements.txt ./run ``` +#### systemd Configuration +After building the virtual environment, add the following to `/lib/systemd/system/whoogle.service`: + +``` +[Unit] +Description=Whoogle + +[Service] +Type=simple +User=root +WorkingDirectory= +ExecStart=/venv/bin/python3 -um app --host 0.0.0.0 --port 5000 +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +RestartSec=3 +SyslogIdentifier=whoogle + +[Install] +WantedBy=multi-user.target +``` +Then, +``` +sudo systemctl daemon-reload +sudo systemctl enable whoogle +sudo systemctl start whoogle +``` + ### E) Manual (Docker) 1. Ensure the Docker daemon is running, and is accessible by your user account - To add user permissions, you can execute `sudo usermod -aG docker yourusername`