NAME
ftpshut — create shutdown message file to shut down the ftp servers at a given time
SYNOPSIS
/usr/bin/ftpshut
[-V]
[-l
min]
[-d
min]
time
[warning-message]
DESCRIPTION
The
ftpshut
command
provides an automated shutdown procedure that a superuser
can use to notify ftp users
when the ftp server is shutting down.
This command will create a shutdown message file
in the path specified by the
shutdown
directive in the
/etc/ftpd/ftpaccess
file in the real, anonymous and virtual user accounts.
For guest accounts the system administrator must copy the message
file created in the real user
account to the guest accounts manually.
The server will check this file regularly
to see if the server is going to be shut down.
Options
- -d min
Set the
disc_offset.
All current FTP connections will be dropped
min
minutes before shutdown.
The default value of
min
is 5 minutes.
This value can be reset by the user.
- -l min
Set the
deny_offset.
New FTP access is disabled
min
minutes before
shutdown.
The default value of
min
is 10 minutes.
This value can be reset by the user.
- -V
Display copyright and version information, then terminate.
Operands
- time
The time at which the ftp server will be shut down.
If
time
is set to the word
now
the shutdown will be immediate.
time
can also be set to a future time.
Future time can be specified in one of the two formats:
+number
or
HHMM.
The first format brings the ftp servers down in
number
minutes.
The second format brings the ftp servers down at the time of day indicated,
using a 24-hour clock format.
- warning-message
The message the server will flash to its clients on shutdown.
The user
can use a message of his choice or use the "macros" or "magic cookies" that are
available.
The server will replace the macro with the specified text string.
The
warning-message
will be formatted to be 75 characters long, including the length of any expanded
macros ("magic cookies").
The default warning message is "System shutdown at %s
".
The following magic cookies are available:
- %s
time system is going to shut down
- %r
time new connections will be denied
- %d
time current connections will be dropped
- %C
current working directory
- %E
the maintainer's e-mail address as defined in
ftpaccess
- %L
local host name
- %M
maximum allowed number of users in this class
- %N
current number of users in this class
- %R
remote host name
- %T
local time (form: Thu Nov 15 17:12:42 1990)
- %U
user name given at login time
RETURN VALUE
ftpshut
sets its exit value to:
- 0
Success.
- 1
Failure.
- -1
The wrong parameter was passed to
ftpshut.
WARNINGS
You can kill the servers only between now and 23:59, if
you use the absolute time for
ftpshut.
AUTHOR
ftpshut
was developed by the Washington University, St. Louis, Missouri.