If I execute rc.local manually, the command works and the screen is started. However, if I restart the RPI no screens are present and the command is not running. I'm sure rc.local is executed as I also have another (non-screened) command before the screen command and that command is running fine.
Code: Select all
su pi -c "(nohup screen -dmS somename bash -c 'the_command' &)"
I also tried to create a service using systemd with that exact same command, but this yields the exact same result: When i start the service manually via the command line (sudo systemctl start my.service), the service starts and the screen is running. But when I reboot the RPI , the service is started but the screen is again not present. If start the service manual directly after logging th screen appears normally
I used this exact same setup/command before in rc.local on my previous install, so I'm 100% sure this worked before. Something must be different now which is for whatever reason not starting the screen only at startup.
Any thoughts what this might be or how I can debug this further?