jailer is used for managing FreeBSD jails from the inside. It takes care of the startup, shutdown and console. See the man page for details on how it works.
Included is injail, a utility (contributed by J. Quick) to test in scripts whether the current process is running in a jail or not. See the man page.
Note: No new releases of jailer jailer will be released barring security holes. On new versions of FreeBSD (past 5.1) jailutils include support for everything that jailer used to do.
See license. Contact me when bugs are found.