From c61fbdfcb9bcd405c5a0a9b5f7050a58a871db6e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 24 Jun 2010 16:13:56 +0200 Subject: man: extend systemd-notify man page a bit --- man/systemd-notify.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml index 46f3f1afaf..5286418cc0 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. + @@ -153,6 +158,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 -- cgit v1.2.3-54-g00ecf