I'm trying to run a server automatically when my vagrant box boots.
Similar to start screen detached in a vagrant box with ssh, how?, except I'm trying to do it with a provisioning script set to run: "always"
.
I'm doing something like this: nohup screen -S server -mL -d bash -c 'start-my-server.sh'
.
The server starts fine, and if I would have done this within the shell, I could switch to the server with screen -r server
.
When I go in after with vagrant ssh
, it doesn't find any screens...I'm assuming this is because its not the same shell session.
Is there anyway to get a hold of that screen session?
Edit
Forgot to mention that I had prefixed the screen command with nohup