I have a service that I run with a program that we developed. I want this program to start on startup and I want it to run in the foreground.
Now I got it to a place where I can run it using " service xxx start " and it also starts up when killed which is perfect. But I also want it to run in the foreground with a terminal?
Here is the code in the /etc/init/test.conf As you can see this is a test with gnome-calculator which seems to work fine actually. BUT the moment I want to run my cmd program instead it launches it in the background.
Ok I am using the following code to try and run a command line program.
#!upstart
description "Node Server"
# Start job via the daemon control script.
exec su -l gert -c 'export DISPLAY=:0; /usr/bin/gnome-calculator'
#Restart process if it dies with a signal
# or exit code not given by the 'normal exit' status.
respawn
#Give up if restart occurs 10 times in 90 seconds
respawn limit 10 90
Thanks