0

I want to start a shell script in detached mode on ubuntu bootup (via cronjob @reboot) but it doesn't even work when I try it directly.

Syntax:

screen -d -m -S myscreenname /path/to/my/script.sh

There is no feedback at all and no screen is being opened. I did not find any active process as well. I also tried it without -S and the name or with different commands.

Does somebody have an idea?

user3245821
  • 63
  • 1
  • 1
  • 5

1 Answers1

0

If the script terminates, the screen session will terminate as well. That is most likely what is happening. Inserting a command in the script to touch a new file somewhere could confirm that the script is actually being started.

kasperd
  • 30,455
  • 17
  • 76
  • 124
  • 1
    Or even better - add some `read` to the script. That force him await for some user interaction and `screen` stay running until user press – Kondybas Aug 16 '14 at 23:21