diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /docs-xml/smbdotconf/logon/shutdownscript.xml | |
parent | Initial commit. (diff) | |
download | samba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs-xml/smbdotconf/logon/shutdownscript.xml')
-rw-r--r-- | docs-xml/smbdotconf/logon/shutdownscript.xml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/logon/shutdownscript.xml b/docs-xml/smbdotconf/logon/shutdownscript.xml new file mode 100644 index 0000000..ea5b65f --- /dev/null +++ b/docs-xml/smbdotconf/logon/shutdownscript.xml @@ -0,0 +1,61 @@ +<samba:parameter name="shutdown script" + context="G" + type="string" + substitution="1" + xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> +<description> + <para>This a full path name to a script called by + <citerefentry><refentrytitle>smbd</refentrytitle> + <manvolnum>8</manvolnum></citerefentry> that should + start a shutdown procedure.</para> + + <para>If the connected user possesses the <constant>SeRemoteShutdownPrivilege</constant>, + right, this command will be run as root.</para> + + <para>The %z %t %r %f variables are expanded as follows:</para> + + <itemizedlist> + <listitem> + <para><parameter moreinfo="none">%z</parameter> will be substituted with the + shutdown message sent to the server.</para> + </listitem> + + <listitem> + <para><parameter moreinfo="none">%t</parameter> will be substituted with the + number of seconds to wait before effectively starting the + shutdown procedure.</para> + </listitem> + + <listitem> + <para><parameter moreinfo="none">%r</parameter> will be substituted with the + switch <emphasis>-r</emphasis>. It means reboot after shutdown + for NT.</para> + </listitem> + + <listitem> + <para><parameter moreinfo="none">%f</parameter> will be substituted with the + switch <emphasis>-f</emphasis>. It means force the shutdown + even if applications do not respond for NT.</para> + </listitem> + </itemizedlist> + + <para>Shutdown script example: +<programlisting format="linespecific"> +#!/bin/bash + +time=$2 +let time="${time} / 60" +let time="${time} + 1" + +/sbin/shutdown $3 $4 +$time $1 & + +</programlisting> + Shutdown does not return so we need to launch it in background. + </para> + +</description> +<related>abort shutdown script</related> +<value type="default"></value> +<value type="example">/usr/local/samba/sbin/shutdown %m %t %r %f</value> + +</samba:parameter> |