What is the problem?
I have setup Octoprint on my Mac mini running MacOS1.15.5.
Got all running and connected. On rebooting my Mac I am now stuck in safe mode.
What did you already try to solve it?
I have tried adding the commands:
sudo service octoprint restart
sudo -A service octoprint restart
sudo -S service octoprint restart
From the logs I need to input password to restart. How do I configure this?
From the looks of it
sudo -S service octoprint restart was the closest but want a password. -A I don have an ask pass program.
Logs
2! STDERR: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2020-06-12 10:49:58,548 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-06-12 10:50:29,197 - octoprint.server.api.system - INFO - Performing command for core:restart: sudo -S service octoprint restart
2020-06-12 10:50:29,383 - octoprint.server.api.system - WARNING - Command for core:restart failed with return code 1:
! STDOUT:
! STDERR: Password:
! sudo: no password was provided
2020-06-12 10:51:58,909 - octoprint.server.api.system - INFO - Performing command for core:restart: sudo -A service octoprint restart
2020-06-12 10:51:58,991 - octoprint.server.api.system - WARNING - Command for core:restart failed with return code 1:
! STDOUT:
! STDERR: sudo: no askpass program specified, try setting SUDO_ASKPASS
Thanks digitalcan!!!! I recently went through the installation and did the same setup as you, but also struggled with getting the server to restart. One solution I found IF the server is started in Terminal was to use
kill -9 $(jobs -p)
This command worked great to stop the job and then the normal commands to restart everything, but if the autostart script (it.YOURNAME.octoprint.plist) is used terminal won't work. So I used your method to use Automator to make that shell script. Then dumped the script in my octoprint directory (~/OctoPrint/opRestart.app). In the Octoprint server setting command line for Restart Octoprint, i added:
This command will only kill the process.
In order to start it again, if you've followed the community guide to install it on macos and auto-start it on boot, you should just edit the .plist file again and change KeepAlive to true and LaunchOnlyOnce to false.
With this change the process will be re-spawned automatically by launchd.