Dotfiles & curl installation

This commit is contained in:
Sonny 2017-06-17 20:40:54 +02:00
parent 639e4dbf2d
commit 06e8f1e385
2 changed files with 16 additions and 15 deletions

View file

@ -33,6 +33,8 @@ function create_container {
echo "Starting container first time, enter root pass"
systemd-nspawn -D $CONTAINER_PATH passwd
dotfiles $CONTAINER_PATH
}
function add_ssh {
@ -45,4 +47,16 @@ function add_ssh {
sed -i 's/^#PermitRootLogin .*/PermitRootLogin yes/' $1/etc/ssh/sshd_config
}
function dotfiles {
echo -n "Add dotfiles? [y/n]: "
read DOTFILES
if [ "$DOTFILES" == "y" ] ;then
systemd-nspawn -D $1 git clone https://www.github.com/SonnyBA/dotfiles.git $1/root/dotfiles
systemd-nspawn -D $1 $1/root/dotfiles/initialize_script
elif [ -z "$SSH_SERVER" ] ;then
echo "Not cloning anything"
fi
}
create_container