Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ScriptTimeout = 60 * time.Second
ScriptTimeout bounds each script ExecuteScripts runs: a hung script would otherwise hold the start of the service until systemd kills it, and then again at every restart. A variable so tests can shorten it.
Functions ¶
func ExecResultStr ¶
func ExecResultStrArray ¶
func ExecuteScripts ¶
ExecuteScripts runs every regular file of scriptDirectory, in name order, each with the interpreter of its shebang line (/bin/sh without one) and for at most ScriptTimeout. Every run is logged with its output. A failing script does not stop the next ones; the failures come back joined. A missing directory is not an error.
A script that starts a daemon must redirect the daemon's output: once the script has exited, its pipes are closed after a short delay, and a daemon still writing to them is killed by SIGPIPE.
Types ¶
This section is empty.