source: vendor/current/docs-xml/smbdotconf/logon/shutdownscript.xml

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

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