diff --git a/build_lxc.sh b/build_lxc.sh index 97dd594..a81aa2d 100755 --- a/build_lxc.sh +++ b/build_lxc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Configurable params BRIDGE=${BRIDGE:-br0} CONTAINER=${CONTAINER:-STACK} @@ -12,6 +12,11 @@ COPYENV=${COPYENV:-1} # Param string to pass to stack.sh. Like "EC2_DMZ_HOST=192.168.1.1 MYSQL_USER=nova" STACKSH_PARAMS=${STACKSH_PARAMS:-} +# Install cgroup-bin if we don't have it yet +if ! which cgdelete | grep -q cgdelete; then + apt-get install cgroup-bin +fi + # Create lxc configuration LXC_CONF=/tmp/$CONTAINER.conf cat > $LXC_CONF < $RC_LOCAL <