Update DTD location
[tprouty/samba.git] / docs / smbdotconf / logon / shutdownscript.xml
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><emphasis>This parameter only exists in the HEAD cvs branch</emphasis>
8         This a full path name to a script called by <citerefentry><refentrytitle>smbd</refentrytitle>                                                    
9         <manvolnum>8</manvolnum></citerefentry> that should start a shutdown procedure.</para>
10
11         <para>This command will be run as the user connected to the server.</para>
12
13         <para>%m %t %r %f parameters are expanded:</para>
14         
15         <itemizedlist>
16                 <listitem>
17                         <para><parameter moreinfo="none">%m</parameter> will be substituted with the
18                         shutdown message sent to the server.</para>
19                 </listitem>
20                 
21                 <listitem>
22                         <para><parameter moreinfo="none">%t</parameter> will be substituted with the
23                         number of seconds to wait before effectively starting the
24                         shutdown procedure.</para>
25                 </listitem>
26                 
27                 <listitem>
28                         <para><parameter moreinfo="none">%r</parameter> will be substituted with the
29                         switch <emphasis>-r</emphasis>. It means reboot after shutdown
30                         for NT.</para>
31                 </listitem>
32                 
33                 <listitem>
34                         <para><parameter moreinfo="none">%f</parameter> will be substituted with the
35                         switch <emphasis>-f</emphasis>. It means force the shutdown
36                         even if applications do not respond for NT.</para>
37                 </listitem>
38         </itemizedlist>
39
40         <para>Shutdown script example:
41 <programlisting format="linespecific">
42 #!/bin/bash
43                 
44 $time=0
45 let &quot;time/60&quot;
46 let &quot;time++&quot;
47
48 /sbin/shutdown $3 $4 +$time $1 &amp;
49 </programlisting>
50 Shutdown does not return so we need to launch it in background.
51 </para>
52 </description>
53 <related>abort shutdown script</related>
54 <value type="default"></value>
55 <value type="example">/usr/local/samba/sbin/shutdown %m %t %r %f</value>
56
57 </samba:parameter>