ports/sysutils/py3-iocage/files/iocage.in
Marcelo Araujo 92aa65dab7 iocage is a jail/container manager amalgamating some of the best
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.
2017-03-17 09:59:15 +00:00

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"