I'm running a Centos 6.3 server and I want to start my Websocket server on startup. For that I need to run a screen session and within the session run the command
So I tried adding this line at the end of rc.local:
su websocket -c "screen -S ws -d -m /var/includes/websocket/start.sh"
In start.sh :
start.sh is executable
cd /var/includes/websocket; node websocketServer.js;
PS: The command is working fine in shell as root