Answer the question
In order to leave comments, you need to log in
How can I start a program with screen and exit without stopping it?
I'm building my entire application with terraform and AWS. Everything works as it should, but my backing is written in main.go and it needs to be launched somehow. I tried to prescribe in user_data ec2
screen -dm bash -c "go run cmd/main.go"
With the logic that the system will rise, root will run this command, end the session and the application will continue to work. But as a result, no session is created in screen. Is it possible somehow to run the file automatically through screen or other utilities so that it does not fall off when disconnected?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question