X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fsystemd-notify.xml;h=59d6b2fd8779d128df4a5ebb7195b6f2622f02bb;hp=46f3f1afaf6a82f741cb3007cb2a483e806276d2;hb=18f593360bfbce6ab5f74d06a97238ff7171df79;hpb=c5abba08873903d80a2dcdd46aace959fcae1b0f diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml index 46f3f1afa..59d6b2fd8 100644 --- a/man/systemd-notify.xml +++ b/man/systemd-notify.xml @@ -73,6 +73,11 @@ environment variables to send as part of the status update. + Note that systemd will refuse reception of + status updates from this command unless + NotifyAccess=all is set for the + service unit this command is called from. + @@ -142,6 +147,17 @@ semantics of this option see sd_booted3. + + + + + Controls disk + read-ahead operations. The argument + must be a string, and either "cancel", + "done" or "noreplay". For details + about the semantics of this option see + sd_readahead3. + @@ -153,6 +169,34 @@ code otherwise. + + Example + + + Start-up Notification and Status Updates + + A simple shell daemon that sends + start-up notifications after having set up its + communication channel. During runtime it sends + further status updates to the init + system: + + #!/bin/bash + +mkfifo /tmp/waldo +systemd-notify --ready --status="Waiting for data..." + +while : ; do + read a < /tmp/waldo + systemd-notify --status="Processing $a" + + # Do something with $a ... + + systemd-notify --status="Waiting for data..." +done + + + See Also