1 <samba:parameter name="shutdown script"
4 advanced="1" developer="1"
5 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
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>
19 <para><parameter moreinfo="none">%z</parameter> will be substituted with the
20 shutdown message sent to the server.</para>
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>
30 <para><parameter moreinfo="none">%r</parameter> will be substituted with the
31 switch <emphasis>-r</emphasis>. It means reboot after shutdown
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>
42 <para>Shutdown script example:
43 <programlisting format="linespecific">
47 let time="${time} / 60"
48 let time="${time} + 1"
50 /sbin/shutdown $3 $4 +$time $1 &
53 Shutdown does not return so we need to launch it in background.
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>