mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 03:25:27 +03:00
man: extend systemd-notify man page a bit
This commit is contained in:
parent
58474090e9
commit
c61fbdfcb9
@ -73,6 +73,11 @@
|
|||||||
environment variables to send as part of the status
|
environment variables to send as part of the status
|
||||||
update.</para>
|
update.</para>
|
||||||
|
|
||||||
|
<para>Note that systemd will refuse reception of
|
||||||
|
status updates from this command unless
|
||||||
|
<varname>NotifyAccess=all</varname> is set for the
|
||||||
|
service unit this command is called from.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -153,6 +158,34 @@
|
|||||||
code otherwise.</para>
|
code otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Example</title>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Start-up Notification and Status Updates</title>
|
||||||
|
|
||||||
|
<para>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:</para>
|
||||||
|
|
||||||
|
<programlisting>#!/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</programlisting>
|
||||||
|
</example>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
Reference in New Issue
Block a user