I'm trying to start a screen session on startup, so I added my script at the end of rc.local
screen -S ws sh -x /var/includes/websocket/start.sh;
But that doesn't work. My goal is to be able to run in a screen session (screen named ws) 2 commands:
Start.sh content:
cd /var/includes/websocket
node /var/includes/websocket/websocketServer.js 2>&1 >> /var/log/websocket.log' websocket
I also tried creating a cronjob but still unable to start the script.
Any help welcomed!