1 '\" te
   2 .\" Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH FTPSHUT 1M "May 1, 2003"
   7 .SH NAME
   8 ftpshut \- close down the FTP Servers at a given time
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBftpshut\fR [\fB-V\fR] [\fB-v\fR] [\fB-l\fR \fImin\fR] [\fB-d\fR \fImin\fR] \fItime\fR
  13      [\fIwarning-message\fR]...
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fBftpshut\fR command provides an automated shutdown procedure that the
  20 superuser can use to notify FTP users when the FTP Server is shutting down.
  21 .sp
  22 .LP
  23 Ten minutes before shutdown, or immediately if the value of \fItime\fR is less
  24 than ten minutes, any new FTP Server connections will be disabled. You may
  25 adjust the shutdown of new FTP Server connections by means of the \fB-l\fR
  26 option.
  27 .sp
  28 .LP
  29  Five minutes before shutdown, or immediately if the value of \fItime\fR is
  30 less than five minutes, all current FTP connections will be disconnected. You
  31 may adjust the shutdown of current FTP connections by means of the \fB-d\fR
  32 option.
  33 .sp
  34 .LP
  35  The \fBftpshut\fR command creates shutdown message files that the FTP Server
  36 uses to determine when to shutdown. Separate shutdown message files are created
  37 in the anonymous and virtual host FTP Server areas, in addition to the system
  38 wide shutdown message file. Once the shutdown occurs, the server continues to
  39 refuse connections until the appropriate shutdown message file is removed. This
  40 normally is done by using the \fBftprestart\fR(1M) command. The location of the
  41 shutdown message file is specified by the \fBshutdown\fR capability in the
  42 \fBftpaccess\fR file.
  43 .sp
  44 .LP
  45 The following magic cookies are available:
  46 .sp
  47 .ne 2
  48 .na
  49 \fB\fB%s\fR\fR
  50 .ad
  51 .RS 6n
  52 The time system is going to shut down.
  53 .RE
  54 
  55 .sp
  56 .ne 2
  57 .na
  58 \fB\fB%r\fR\fR
  59 .ad
  60 .RS 6n
  61 The time new connections will be denied.
  62 .RE
  63 
  64 .sp
  65 .ne 2
  66 .na
  67 \fB\fB%d\fR\fR
  68 .ad
  69 .RS 6n
  70 The time current connections will be dropped.
  71 .RE
  72 
  73 .sp
  74 .ne 2
  75 .na
  76 \fB\fB%C\fR\fR
  77 .ad
  78 .RS 6n
  79 The current working directory.
  80 .RE
  81 
  82 .sp
  83 .ne 2
  84 .na
  85 \fB\fB%E\fR\fR
  86 .ad
  87 .RS 6n
  88 The maintainer's email address as defined in the \fBftpaccess\fR file.
  89 .RE
  90 
  91 .sp
  92 .ne 2
  93 .na
  94 \fB\fB%F\fR\fR
  95 .ad
  96 .RS 6n
  97 The free space in the partition of \fBCWD\fR, in kilobytes.
  98 .RE
  99 
 100 .sp
 101 .ne 2
 102 .na
 103 \fB\fB%L\fR\fR
 104 .ad
 105 .RS 6n
 106 The local host name.
 107 .RE
 108 
 109 .sp
 110 .ne 2
 111 .na
 112 \fB\fB%M\fR\fR
 113 .ad
 114 .RS 6n
 115 The maximum allowed number of users in this class.
 116 .RE
 117 
 118 .sp
 119 .ne 2
 120 .na
 121 \fB\fB%N\fR\fR
 122 .ad
 123 .RS 6n
 124 The current number of users in this class.
 125 .RE
 126 
 127 .sp
 128 .ne 2
 129 .na
 130 \fB\fB%R\fR\fR
 131 .ad
 132 .RS 6n
 133 The remote host name.
 134 .RE
 135 
 136 .sp
 137 .ne 2
 138 .na
 139 \fB\fB%T\fR\fR
 140 .ad
 141 .RS 6n
 142 The local time (form Thu Nov 15 17:12:42 1990).
 143 .RE
 144 
 145 .sp
 146 .ne 2
 147 .na
 148 \fB\fB%U\fR\fR
 149 .ad
 150 .RS 6n
 151 The username given at login time.
 152 .RE
 153 
 154 .SH OPTIONS
 155 .sp
 156 .LP
 157 The \fBftpshut\fR command supports the following options:
 158 .sp
 159 .ne 2
 160 .na
 161 \fB\fB-V\fR\fR
 162 .ad
 163 .RS 10n
 164 Display program copyright and version information, then terminate.
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fB-d\fR \fImin\fR\fR
 171 .ad
 172 .RS 10n
 173 The time ahead of shutdown, in minutes, that existing connections will be
 174 disconnected upon completion of their current or next (if idle) FTP request.
 175 .RE
 176 
 177 .sp
 178 .ne 2
 179 .na
 180 \fB\fB-l\fR \fImin\fR\fR
 181 .ad
 182 .RS 10n
 183 The time ahead of shutdown, in minutes, that new connections will be refused.
 184 .RE
 185 
 186 .sp
 187 .ne 2
 188 .na
 189 \fB\fB-v\fR\fR
 190 .ad
 191 .RS 10n
 192 Verbose. Output the pathname of the shutdown message files created.
 193 .RE
 194 
 195 .SH OPERANDS
 196 .sp
 197 .LP
 198 The \fBftpshut\fR command supports the following operands:
 199 .sp
 200 .ne 2
 201 .na
 202 \fB\fItime\fR\fR
 203 .ad
 204 .RS 19n
 205 The \fItime\fR at which \fBftpshut\fR will bring the FTP Servers down.
 206 \fItime\fR can have a value of \fBnow\fR, which indicates an immediate
 207 shutdown. Alternatively, \fItime\fR can specify a future time in one of two
 208 formats: \fB+\fR\fInumber\fR or \fIHHMM\fR. The first form brings the FTP
 209 Server down in \fInumber\fR minutes. The second brings the FTP Server down at
 210 the time of day indicated, using a 24-hour clock format. When using the
 211 absolute time format, you can only specify times between now and 23:59.
 212 .RE
 213 
 214 .sp
 215 .ne 2
 216 .na
 217 \fB\fIwarning-message\fR\fR
 218 .ad
 219 .RS 19n
 220 The message to display that warns of the imminent shutdown. The
 221 \fIwarning-message\fR will be formatted at 70 characters wide. \fBftpshut\fR
 222 knows the actual string length of the magic cookies. If no warning-message is
 223 supplied, the default message "\fBSystem shutdown at %s\fR" is used.
 224 .RE
 225 
 226 .SH EXIT STATUS
 227 .sp
 228 .LP
 229 The following exit values are returned:
 230 .sp
 231 .ne 2
 232 .na
 233 \fB\fB0\fR \fR
 234 .ad
 235 .RS 6n
 236 Successful completion.
 237 .RE
 238 
 239 .sp
 240 .ne 2
 241 .na
 242 \fB>\fB0\fR\fR
 243 .ad
 244 .RS 6n
 245 An error occurred.
 246 .RE
 247 
 248 .SH FILES
 249 .sp
 250 .ne 2
 251 .na
 252 \fB\fB/etc/ftpd/ftpaccess\fR\fR
 253 .ad
 254 .RS 24n
 255 
 256 .RE
 257 
 258 .sp
 259 .ne 2
 260 .na
 261 \fB\fB/etc/ftpd/ftpservers\fR\fR
 262 .ad
 263 .RS 24n
 264 
 265 .RE
 266 
 267 .SH ATTRIBUTES
 268 .sp
 269 .LP
 270 See \fBattributes\fR(5) for descriptions of the following attributes:
 271 .sp
 272 
 273 .sp
 274 .TS
 275 box;
 276 c | c
 277 l | l .
 278 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 279 _
 280 Interface Stability     External
 281 .TE
 282 
 283 .SH SEE ALSO
 284 .sp
 285 .LP
 286 \fBin.ftpd\fR(1M), \fBftprestart\fR(1M), \fBshutdown\fR(1M),
 287 \fBftpaccess\fR(4), \fBftpservers\fR(4), \fBattributes\fR(5)