I am trying to create a Linux screen during the deployment using AWS codeDeploy. The purpose is to run the application inside a screen. I want codeDeploy being able to create a screen in detached mode and start the application inside it. I tried these commands in AfterInstall and BeforeInstall stages:
- screen -RS
- screen -dm
But, when the deployment finishes successfully, the screen has not been created. Also, if I try to send a command to the screen that I have tried to create in the previous stage, I get this error: [stdout]Must be connected to a terminal.
So, my questions are:
- How to get codeDeploy running the application inside a screen
- Is it even a decent way of deployment? Maybe I am not supposed to do that at all.
Well, I had made a couple of mistakes that caused the failure.