diff --git a/lxc/lxc_stack.sh b/lxc/lxc_stack.sh new file mode 100755 index 0000000..4f1686c --- /dev/null +++ b/lxc/lxc_stack.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Configurable params +BRIDGE=${BRIDGE:-br0} +CONTAINER=${CONTAINER:-TESTER} +CONTAINER_IP=${CONTAINER_IP:-192.168.1.50} +CONTAINER_CIDR=${CONTAINER_CIDR:-$CONTAINER_IP/24} +CONTAINER_NETMASK=${CONTAINER_NETMASK:-255.255.255.0} +CONTAINER_GATEWAY=${CONTAINER_GATEWAY:-192.168.1.1} +NAMESERVER=${NAMESERVER:-192.168.1.1} +COPYENV=${COPYENV:-1} + +# Destroy any existing container +lxc-stop -n $CONTAINER +lxc-destroy -n $CONTAINER + +# Create network configuration +NET_CONF=/tmp/net.conf +cat > $NET_CONF < $INTERFACES < $INSTALL_SH < $RC_LOCAL <