diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/container-autostart | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/bin/container-autostart b/bin/container-autostart index 92e2383..cf4fec1 100755 --- a/bin/container-autostart +++ b/bin/container-autostart @@ -18,30 +18,14 @@ set -e -if [ ! -x /usr/bin/screen ] -then - echo "'${NAME}': /usr/bin/screen - no such file." >&2 - exit 1 -fi - HOST="$(hostname -f)" -HOME="${HOME:-/root}" -SHELL="/bin/bash" -export HOME SHELL - -cd "${HOME}" - -#screen -S container -A -d -m -t cnt bash -cl "cntsh && bash -l" -screen -S container -A -d -m -t cnt bash -l - for CONFIG in /etc/container-tools/config/*.conf do if grep -Eqs "^ *cnt.autostart=true" "${CONFIG}" || grep -Eqs "^ *cnt.autostart=${HOST}" "${CONFIG}" then CONTAINER="$(basename ${CONFIG} .conf)" - TITLE="$(echo ${CONTAINER} | awk -F. '{ print $1 }')" - screen -S container -X screen -t ${TITLE} bash -cl "cnt start -n ${CONTAINER} && bash -l" + cnt start -n ${CONTAINER} fi done |