vagrant-lxc-base-boxes/common/utils.sh
Eric Keller 24c3d73a53 fix redirection typo to ${LOG}
This commit fixes the redirection of std error to the ${LOG} file.
It was starting all lxc command in background, resulting in unpredictable failures.
2015-12-15 17:41:59 +01:00

23 lines
433 B
Bash

#!/bin/bash
utils.lxc.attach() {
cmd="$@"
log "Running [${cmd}] inside '${CONTAINER}' container..."
(lxc-attach -n ${CONTAINER} -- $cmd) &>> ${LOG}
}
utils.lxc.start() {
lxc-start -d -n ${CONTAINER} &>> ${LOG} || true
}
utils.lxc.stop() {
lxc-stop -n ${CONTAINER} &>> ${LOG} || true
}
utils.lxc.destroy() {
lxc-destroy -n ${CONTAINER} &>> ${LOG}
}
utils.lxc.create() {
lxc-create -n ${CONTAINER} "$@" &>> ${LOG}
}