Systemd can't start script?

In addition to what TokyoMEWS found by themselves...

Apparently, if your script starts something else it needs "Type=forking"

(which is not completely correct – Type=forking only becomes necessary if your script exits while its children are running)

...other possible problems are:

  1. I'm guessing that by "display on screen" you meant that the script simply writes something to stdout. This does not go to the screen during boot – rather, everything from a service's stdout is sent to the journal (or to syslog depending on your systemd version).

  2. If you did actually attempt write to the screen (e.g. using echo Hi >/dev/tty1), then it's very likely that the script's output disappears when agetty clears the screen before showing login prompts. (To avoid that, you would have to order the unit [email protected]).

  3. To write something to a file, you need to have the file system mounted read-write. For this, After=local-fs.target might be necessary, otherwise the unit again might be started too early. But this depends on specific OS configuration.

Tags:

Systemd