You want to add the following options to the 'screen' commands (e.g. before -S
): -d -m
From the manpage:
-d -m Start screen in "detached" mode. This creates a new session but
doesn't attach to it. This is useful for system startup
scripts.