I'm trying to write a script that will create 4 background processes doing different things on my server, but I'm really struggling to get it working.
My script looks like this:
screen -d -m -S processes
screen -S processes -X alarm-daemon bash -c "/home/ross/script.d/startDameon.sh"
screen -S processes -X watchdog bash -c "/home/ross/script.d/startWatchdog.sh"
screen -S processes -X openhab bash -c "tail /var/log/openhab/openhab.log -f"
screen -S processes -X alarmMqttClient bash -c "/home/ross/LS30/alarmMqttClient.pl"
Whilst I do have a screen session created it only has one window with nothing in it - obviously something isn't correct!