Here is my question:
I would like to autostart script with screen session.
Here it is manual solution:
So, the idea is that script run.sh will run inside screen session. Unfortunatelly, it must be that way.
I would like to place it to /etc/rc.d/rc.local (this is Linux Centos), and start it while the whole box has started.
I tried something like:
cd /opt/directory && screen -p 0 -X stuff './run.sh^M'
and couple of other solution, which I have found using Google, but this still not work.
What I am doing wrong? How to make it work as design?