<samba:parameter name="shutdown script"
context="G"
type="string"
- advanced="1" developer="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>This a full path name to a script called by
<manvolnum>8</manvolnum></citerefentry> that should
start a shutdown procedure.</para>
- <para>If the connected user posseses the <constant>SeRemoteShutdownPrivilege</constant>,
- right, this command will be run as user.</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>
<para>Shutdown script example:
<programlisting format="linespecific">
#!/bin/bash
-
-$time=0
-let "time/60"
-let "time++"
+
+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>