I reviewed few posts on this issue but none of them apply in my case.
My octoprint server has been working fine for several months but, I just cannot find where octoprint.service is located at therefore, I can restart it using the web UI.
sudo service octoprint restart doesn't work/exists and sudo find . -name octoprint-service sudo find . -name octoprint* retuns nothing.
We definitely need more details about your system and how OctoPrint was installed. If it's Python 3.11 I don't suspect it was that long ago. How was it installed/which guides did you use to install it?
Unfortunately, I don't remember which tutorial I followed to install it but it wasn't too long ago as I'm running it on "bookworm". Python's ver. is indeed 3.11.2.
Under the /home/pi/Octoprint directory I've the following: bin include lib lib64 pyvenv.cfg
This morning I searched in crontab and found the line which starts the server at boot: @reboot /home/pi/OctoPrint/bin/octoprint serve.
So, what should I put in the "Restart OctoPrint" under the Server settings to restart Octoprint via the web UI?
Thx.
It seems like your best option would be to follow the "systemd" section of https://github.com/OctoPrint/OctoPrint/tree/master/scripts#systemd to install the octoprint.service file. Where the instructions on that page say "make necessary modifications", you would need to edit the file so that the ExecStart line matches the location of octoprint on your system (based on your last post, that would be /home/pi/OctoPrint/bin/octoprint).
Once that is done, remove the line that starts octoprint from your crontab to prevent conflicts, and reboot to make sure octoprint starts correctly.
Then you can use one of the standard commands sudo service octoprint restart or sudo systemctl restart octoprint as your "Restart OctoPrint" command.