Fix bug #6769 - symlink unlink does nothing.
[Samba/ekacnet.git] / docs-xml / smbdotconf / logon / shutdownscript.xml
blob2936a14c56d0eb9b85b4b907805617afc2a37b06
1 <samba:parameter name="shutdown script"
2                  context="G"
3                                  type="string"
4                  advanced="1" developer="1"
5                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
6 <description>
7         <para>This a full path name to a script called by 
8          <citerefentry><refentrytitle>smbd</refentrytitle> 
9         <manvolnum>8</manvolnum></citerefentry> that should 
10         start a shutdown procedure.</para>
12         <para>If the connected user posseses the <constant>SeRemoteShutdownPrivilege</constant>,
13         right, this command will be run as root.</para>
15         <para>The %z %t %r %f variables are expanded as follows:</para>
16         
17         <itemizedlist>
18                 <listitem>
19                         <para><parameter moreinfo="none">%z</parameter> will be substituted with the
20                         shutdown message sent to the server.</para>
21                 </listitem>
22                 
23                 <listitem>
24                         <para><parameter moreinfo="none">%t</parameter> will be substituted with the
25                         number of seconds to wait before effectively starting the
26                         shutdown procedure.</para>
27                 </listitem>
28                 
29                 <listitem>
30                         <para><parameter moreinfo="none">%r</parameter> will be substituted with the
31                         switch <emphasis>-r</emphasis>. It means reboot after shutdown
32                         for NT.</para>
33                 </listitem>
34                 
35                 <listitem>
36                         <para><parameter moreinfo="none">%f</parameter> will be substituted with the
37                         switch <emphasis>-f</emphasis>. It means force the shutdown
38                         even if applications do not respond for NT.</para>
39                 </listitem>
40         </itemizedlist>
42         <para>Shutdown script example:
43 <programlisting format="linespecific">
44 #!/bin/bash
46 time=$2
47 let time=&quot;${time} / 60&quot;
48 let time=&quot;${time} + 1&quot;
50 /sbin/shutdown $3 $4 +$time $1 &amp;
52 </programlisting>
53         Shutdown does not return so we need to launch it in background.
54         </para>
56 </description>
57 <related>abort shutdown script</related>
58 <value type="default"></value>
59 <value type="example">/usr/local/samba/sbin/shutdown %m %t %r %f</value>
61 </samba:parameter>