Add new framework for smb.conf(5). Please read README before trying to compile.
[Samba/gebeck_regimport.git] / docs / docbook / smbdotconf / logon / shutdownscript.xml
blobac286393b575f8c7ac9ef1fe59bad7a4cec978ad
1 <samba:parameter xmlns:samba="http://samba.org/common">
2                 <term><anchor id="SHUTDOWNSCRIPT"/>shutdown script (G)</term>
3                 <listitem><para><emphasis>This parameter only exists in the HEAD cvs branch</emphasis>
4                 This a full path name to a script called by
5                 <ulink url="smbd.8.html"><command moreinfo="none">smbd(8)</command></ulink> that
6                 should start a shutdown procedure.</para>
8                 <para>This command will be run as the user connected to the
9                 server.</para>
11                 <para>%m %t %r %f parameters are expanded</para>
12                 <para><parameter moreinfo="none">%m</parameter> will be substituted with the
13                 shutdown message sent to the server.</para>
14                 <para><parameter moreinfo="none">%t</parameter> will be substituted with the
15                 number of seconds to wait before effectively starting the
16                 shutdown procedure.</para>
17                 <para><parameter moreinfo="none">%r</parameter> will be substituted with the
18                 switch <emphasis>-r</emphasis>. It means reboot after shutdown
19                 for NT.
20                 </para>
21                 <para><parameter moreinfo="none">%f</parameter> will be substituted with the
22                 switch <emphasis>-f</emphasis>. It means force the shutdown
23                 even if applications do not respond for NT.</para>
25                 <para>Default: <emphasis>None</emphasis>.</para>
26                 <para>Example: <command moreinfo="none">abort shutdown script = /usr/local/samba/sbin/shutdown %m %t %r %f</command></para>
27                 <para>Shutdown script example:
28 <programlisting format="linespecific">
29 #!/bin/bash
30                 
31 $time=0
32 let &quot;time/60&quot;
33 let &quot;time++&quot;
35 /sbin/shutdown $3 $4 +$time $1 &amp;
36 </programlisting>
37                 Shutdown does not return so we need to launch it in background.
38                 </para>
40                 <para>See also <link linkend="ABORTSHUTDOWNSCRIPT"><parameter moreinfo="none">abort shutdown script</parameter></link>.</para>
41                 </listitem>
42                 </samba:parameter>