-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Setup Service on Linux
Ozzie Isaacs edited this page Nov 20, 2021
·
9 revisions
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.
[Unit]
Description=Calibre-Web
[Service]
Type=simple
User={Username}
ExecStart={path to python} {/PATH/TO/cps.py including cps.py}
WorkingDirectory={/PATH/OF/CPS.PY without cps.py}
[Install]
WantedBy=multi-user.target
Find the location of the calibre-web starterfile cps
, this should be something like /home/<user>/.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
sudo systemctl enable cps.service
enables the service.