jkill
—
stop or restart a jail
jkill |
[-fkqv ] [-t
timeout] jail ... |
jkill |
-r [-fqv ]
[-t timeout]
jail ... |
The jkill
utility stops one or more jails in an orderly
fashion. It calls the shutdown scripts inside the jail and then kills all
remaining processes. When used with the -r
option it
can also restart the jail.
jkill
can also be run from within a jail,
to shutdown or restart the jail. Replace the halt or
reboot binaries in your jails with
jkill
as a hard link. Each of these commands will
then perform their respective actions in the jail.
-f
- Force the processes to quit. If processes remain after sending them a
SIGTERM then kill them with SIGKILL which forces the a process exit.
-k
- Don't call the shutdown scripts, just kill the processes.
-q
- Supress warnings.
-r
- After shutting down the jail, restart it by running the
/etc/rc startup script.
-t
timeout
- Specify a maximum timeout to wait after running the shutdown scripts and
between the sending the various kill signals. The default is 3
seconds.
-v
- Show the output of shutdown or startup scripts on the console. This also
enables all warnings.
- jail
- Either a jail id (which is an integer) or a jail host name.
It's generally assumed that the jail in question is a 'full jail' with startup
and shutdown scripts. If that's not the case use the
-k
option.
The startup and shutdown scripts inside the jail must be shell
scripts and must be owned by root in order to be executed.
The environment is purged properly before running the scripts in
the jail in order to prevent unwanted information from leaking into the
jail.
Both startup and shutdown are logged to the jail's console if it
exists.
jkill
needs a valid
/dev/null device in the jail. If it doesn't exit for
some reason it is automatically created.
/etc/rc /etc/rc.shutdown
/dev/console
Stef Walter ⟨stef@memberwebs.com⟩