SYSTEMD-NOTIFY(1) systemd-notify SYSTEMD-NOTIFY(1) (NAME) systemd-notify - (SYNOPSIS) systemd-notify [OPTIONS...] [VARIABLE=VALUE...] systemd-notify --exec [OPTIONS...] [VARIABLE=VALUE...] ; -- {CMDLINE...} systemd-notify --fork [OPTIONS...] -- {CMDLINE...} (DESCRIPTION) systemd-notify . . . (wrapper) sd_notify() . sd_notify(3) . . NotifyAccess= . systemd.service(5) . sd_notify() . (fork) NotifyAccess=main NotifyAccess=exec . sd_notify() NotifyAccess=all . systemd-notify . --no-block (race condition) . systemd-notify PID systemd-notify ( ) sd_notify() . . PID . -- systemd-notify -- NotifyAccess=all . --pid= . (OPTIONS) : --ready . systemd-notify READY=1 . sd_notify(3) . --reloading . systemd-notify RELOADING=1 ( MONOTONIC_USEC= Type=notify-reload systemd.service(5) ). sd_notify(3) . 253. --stopping (shutdown) . systemd-notify STOPPING=1 . sd_notify(3) . 253. --pid= PID . PID . "auto" PID systemd-notify . "self" PID systemd-notify "parent" PID -- . --pid=auto systemd-notify --pid=$PID . sd_notify(3) . systemd-notify PID --pid= sd_notify() . . PID . systemd-notify --pid= NotifyAccess=main NotifyAccess=exec . systemd-notify -- ( ) -- NotifyAccess=all . systemd.service(5) . --uid=USER (UID) . UID . UID . . 237. --status= . . systemd-notify STATUS=... . sd_notify(3) . status systemctl(1)' . --booted (boot) 0 . . . sd_booted(3) . systemctl(1) is-system-running . "offline" . --no-block . systemd-notify systemd-notify . (race conditions) . 246. --exec systemd-notify . ";" ( ) . <<>> PID. ";" systemd-notify "\;" (escaped). 254. --fd= . FileDescriptorStoreMax= systemd.service(5) . systemd-notify . . bash(1) : systemd-notify --fd=4 --fd=5 4 254. --fdname= --fd= ( ) . "FDNAME=" . . . 254. --fork (fork) "READY=1" . : systemd-notify . sd_notify() . /dev/null . systemd-notify ( --quiet ) . systemd-notify (process reaper) . systemd-run . systemd-notify : 1. systemd-notify "READY=1" . 2. "READY=1" ( ) . : # PID=$(systemd-notify --fork -- mycommand) ... kill "$PID" unset PID 258. --quiet, -q --fork . 258. -h, --help . --version . (EXIT STATUS) 0 . (EXAMPLES) 1. . init : #!/bin/sh mkfifo /tmp/waldo systemd-notify --ready --status="Waiting for data..." while : ; do read -r a < /tmp/waldo systemd-notify --status="Processing $a" # Do something with $a ... systemd-notify --status="Waiting for data..." done (SEE ALSO) systemd(1), systemctl(1), systemd.unit(5), systemd.service(5), sd_notify(3), sd_booted(3) systemd 261.2 SYSTEMD-NOTIFY(1)