mirror of
https://git.freebsd.org/ports.git
synced 2025-07-13 07:19:16 -04:00
features and technologies the FreeBSD operating system has to offer. It is geared for ease of use with a simple and easy to understand command syntax. This is the new and the most updated version of iocage written in python3.6. Submitted by: brandon@ixsystems.com (author and maintainer) via email.
47 lines
763 B
Bash
47 lines
763 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: iocage
|
|
# REQUIRE: LOGIN cleanvar sshd ZFS
|
|
# BEFORE: securelevel
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf to enable iocage:
|
|
#
|
|
# iocage_enable="YES"
|
|
#
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="iocage"
|
|
rcvar=iocage_enable
|
|
|
|
# read configuration and set defaults
|
|
load_rc_config "$name"
|
|
: ${iocage_enable="NO"}
|
|
: ${iocage_lang="en_US.UTF-8"}
|
|
|
|
start_cmd="iocage_start"
|
|
stop_cmd="iocage_stop"
|
|
export LANG=$iocage_lang
|
|
|
|
iocage_start()
|
|
{
|
|
if checkyesno ${rcvar}; then
|
|
echo "* [I|O|C] starting jails... "
|
|
/usr/local/bin/iocage start --rc
|
|
fi
|
|
}
|
|
|
|
iocage_stop()
|
|
{
|
|
if checkyesno ${rcvar}; then
|
|
echo "* [I|O|C] stopping jails... "
|
|
/usr/local/bin/iocage stop --rc
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|