alexylem / jarvis

Jarvis.sh is a simple configurable multi-lang assistant.
http://openjarvis.com
MIT License
810 stars 197 forks source link

Autostart without Admin rights #970

Open EGoll opened 4 years ago

EGoll commented 4 years ago

Hi there. Maybe someone can help me with my auto start problem. I still use the OS Stretch and try to start Jarvis automatically after booting on CLI. But whether I use init.d or .service, Jarvis does not start. I can open it manually. Could it be that Jarvis brings an error message when using admin rights? For example "sudo jarvis" does not work, but "jarvis" without sudo.

My script looks like this:

! / bin / sh

BEGIN INIT INFO

Provides: start Jarvis

Required start:

Required-Stop:

Default start: 2 3 4 5

Default stop: 0 1 6

Short-Description: Starts, stops and restarts Jarvis

Description:

END INIT INFO

case "$ 1" in    begin)      echo "start Jarvis"      / home / pi / jarvis / jarvis      ;;    Stop)      echo "stop Jarvis"      killall jarvis      ;;    restart)      echo "Restart Jarvis"      / home / pi / jarvis / jarvis      ;;    *)       #Standard command if start, stop or restart were not passed       echo "(start | stop | restart)"       ;; esac

exit 0

After I assigned the rights with chmod, I can test Jarvis with "start Jarvis start". "sudo startJarvis start" brings an error message again.

I save the script with "sudo update-rc.d startJarvis defaults". But Jarvis doesn't start at boot.

What am I doing wrong?