diff --git a/Setup-Service-on-Linux.md b/Setup-Service-on-Linux.md index 7370826..2a5ee00 100644 --- a/Setup-Service-on-Linux.md +++ b/Setup-Service-on-Linux.md @@ -2,6 +2,10 @@ If you want to get Calibre-Web started automatically after reboot follow this instructions. Create a file `cps.service` as root in the folder /etc/systemd/system with the following content: +Replace the elements in `{}` like User, ExecStart and WorkingDirectory with your username and file- and foldernames. + +### Installation from source + ``` [Unit] Description=Calibre-Web @@ -16,7 +20,25 @@ WorkingDirectory={/PATH/OF/CPS.PY without cps.py} WantedBy=multi-user.target ``` -Replace the elements in `{}` like User, ExecStart and WorkingDirectory with your username and file- and foldernames. +### Installation via pip + +Find the location of the calibre-web starterfile `cps`, this should be something like `/home//.local/bin/cps`. +Another option is using `{path to correct pythoninstance} -m cps` as starterfile. The correct python instance depends on how you installed calibre-web (e.g. virtual environment, system interpreter) + +``` +[Unit] +Description=Calibre-Web + +[Service] +Type=simple +User={Username} +ExecStart={path to starterfile} + +[Install] +WantedBy=multi-user.target +``` + +### Start Service `sudo systemctl enable cps.service`