MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Server (https://www.mobileread.com/forums/forumdisplay.php?f=277)
-   -   Stopping Content server from command line (https://www.mobileread.com/forums/showthread.php?t=328334)

dcoulombe 03-24-2020 11:41 PM

Stopping Content server from command line
 
Hello,

I am running a book server on a Raspberry Pi 4. I am using the following line on CRONTAB to start the server on boot.

@reboot /usr/bin/calibre-server --access-log /home/pi/LOG/access.log --log /home/pi/LOG/oper.log --daemonize --port 8080

It works great so far, except when I want to stop the content server for maintenance or other stuff. I spend much time trying to find the command to STOP it, but could not find anything close. So the simple question is: how can I stop the content server from the command line appropriate for CALIBRE-SERVER ? As it stands now, I comment the startup line in crontab, and reboot to finally have access to calibre for maintenance... Somewhat of a pain!

Thanks for any help.:help:

kovidgoyal 03-25-2020 12:34 AM

Send it SIGINT or SIGTERM with the kill command just like you would for any daemon. Add the --pidfile option and use

kill `cat /path/to/pidfile`

dcoulombe 03-25-2020 12:46 PM

Thanks a lot, Kovid... I got it working!

Have a nice day!


All times are GMT -4. The time now is 05:34 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.