chiark / gitweb /
man: be more explicit about the usefulness of --system
[elogind.git] / man / systemd-notify.xml
index 46f3f1afaf6a82f741cb3007cb2a483e806276d2..59d6b2fd8779d128df4a5ebb7195b6f2622f02bb 100644 (file)
                 environment variables to send as part of the status
                 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>
                                 semantics of this option see
                                 <citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
                         </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--readahead=</option></term>
+
+                                <listitem><para>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
+                                <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
+                        </varlistentry>
                 </variablelist>
 
         </refsect1>
                 code otherwise.</para>
         </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 &lt; /tmp/waldo
+        systemd-notify --status="Processing $a"
+
+        # Do something with $a ...
+
+        systemd-notify --status="Waiting for data..."
+done</programlisting>
+                </example>
+        </refsect1>
+
         <refsect1>
                 <title>See Also</title>
                 <para>