0

I am very new to Ubuntu & Linux. I have deployed an C# Console Application to an EC2 Instance running Ubuntu 12.10. Currently I am using mono foldername/appname.exe to start the app. How do I add this to the start up?

Thanks in advance.

Libin TK
  • 111
  • 5

2 Answers2

1

Solved the issue by creating a script file /etc/init/app.exe.conf which contains the below code

description "APP Description"
start on runlevel [2345]
stop on runlevel [016]

setuid ubuntu
setgid nogroup
respawn
console log

script
exec mono /opt/folder/app.exe
end script`
Libin TK
  • 111
  • 5
0

The problem with the /etc/init/ solution is that you need root privileges to do it.

If you are in the situation of needing the same and not having these privileges, you could use crontab. Do man crontab to find out more.

knocte
  • 347
  • 1
  • 6
  • 18