Free Software UK

Discussion about Free Software here in the UK

You are not logged in.

#1 2018-01-21 12:56:29

From: Worthing, South East
Registered: 2016-10-16
Posts: 61

Systemd kills interactive service

I just solved an annoying problem with systemd and I thought it would be helpful to post the solution.

I wanted to make an interactive service that runs at boot. It uses the TTY to take some user input to tell it how to set up certain mounts.

It worked except it always got killed after 3 seconds. Took me ages to work out why, as logs simply showed "Killed".

Turns out that when the boot completed and getty@tty1.service activated, it killed my interactive script. Presumably because it was using sdtin & stdout.

Solution was to add the following to the .service file:


More helpful info available here:

Forum Founder and Boss. View my blog and submit to my FS success stories platform.

Fellow of the FSFE (#3509)


Board footer

Free Software UK forum - founded by Joseph Graham, hosted by Mythic Beasts, Powered by FluxBB