I made a small add-on that works as a launcher. basically is just this
Script runs fine, but it gets killed as soon as Kodi quits, I understand why it does it, but it's there a way to run a script and keep it running after Kodi quits?
I made a small add-on that works as a launcher. basically is just this
Script runs fine, but it gets killed as soon as Kodi quits, I understand why it does it, but it's there a way to run a script and keep it running after Kodi quits?
Thanks, I tried that but this particular program does not like to be run as service/daemon for whatever reason 
Thanks, but that does the same thing  as soon as Kodi gets killed so does the script
 as soon as Kodi gets killed so does the script
Try "nohup /usr/bin/pegasus-fe.sh"
Thanks, but that does the same thing
as soon as Kodi gets killed so does the script
Try to add & after the command: os.system("command &")
nohup doesn't work.
I think only systemd-run will work. Check why your script doesn't like it.
nohup doesn't work.
I think only systemd-run will work. Check why your script doesn't like it.
yeah, nothing seems to work, except systemd (I have tried it with another program and it works)
Try to add & after the command: os.system("command &")
Try "nohup /usr/bin/pegasus-fe.sh"
nohup does not work, adding a & at the end doesn't either  guess I will have to tackle this from another perspective.
 guess I will have to tackle this from another perspective.
Thanks for the help!
Maybe try the combination of nohup and the ampersand: "nohup command &".
If I issue this command from a shell, log out from the kodi box and re-login again I can see the command still running. Which does not mean it will work for you as well, but you might give it a try.
Maybe try the combination of nohup and the ampersand: "nohup command &".
If I issue this command from a shell, log out from the kodi box and re-login again I can see the command still running. Which does not mean it will work for you as well, but you might give it a try.
Tried that as well.
not sure what you mean by running it from the shell, that will of course work since you are running it on a separate process. The problem comes when you call it from within Kodi (since it creates a child process) so when you quit it will also take all of the child processes. Unless I am very confused on how this works.
If you really can't use systemd-run then use little more hackish approach.
Make one helper script which runs before kodi (run it from autostart). In this script make a loop and inside loop start your pegasus-fe.sh script. And to know when to start it and when to stop use one temporary file which is created from kodi or some signal.
If you really can't use systemd-run then use little more hackish approach.
Make one helper script which runs before kodi (run it from autostart). In this script make a loop and inside loop start your pegasus-fe.sh script. And to know when to start it and when to stop use one temporary file which is created from kodi or some signal.
That is actually a good idea! I will try that, thanks!
 
		