From a1be084d66ee7c8f462d39e83ebcf74cd6d87af8 Mon Sep 17 00:00:00 2001 From: pvincent Date: Fri, 13 Nov 2020 19:03:00 +0400 Subject: [PATCH] fix containers --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4161362..f3f5525 100755 --- a/install.sh +++ b/install.sh @@ -32,7 +32,9 @@ function install_host { else #remove /etc/skel/.bashrc - rm /etc/skel/.bashrc + if [ -e /etc/skel/.bashrc ]; then + rm /etc/skel/.bashrc + fi ORIGINAL="ORIGINAL" declare -a arr=(/etc/bash.bashrc /etc/inputrc /etc/vim/vimrc) @@ -61,7 +63,7 @@ function install_containers { for container in `/snap/bin/lxc list -c n --format csv`; do echo "pushed to $container" /snap/bin/lxc file push /opt/debian-bash "${container}/opt/" -r - /snap/bin/lxc exec "$container" -- sh -c "cd /opt/debian-bash && ./install.sh" + /snap/bin/lxc exec "$container" -- sh -c "cd /opt/debian-bash && ./install.sh --host" done fi