vagrant-lxc-base-boxes/common/utils.sh
有张纸 b0cb4fe798 Update utils.sh
fix "syntax error near unexpected token `>'"
2015-03-06 15:45:04 +08:00

23 lines
438 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}
}