From 0075d9bc0cb4bdf16a2b45c2525334958b87481f Mon Sep 17 00:00:00 2001 From: cyteen Date: Fri, 8 Jan 2021 22:54:18 +0000 Subject: [PATCH] Small edits.. --- 001_ssh.sh | 4 ++-- 010_generate-ssh.sh | 8 ++++---- 020_docker.sh | 1 + 020_vim.sh | 2 +- 020_zsh_quickstart.sh | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/001_ssh.sh b/001_ssh.sh index 7e03539..a639ee2 100755 --- a/001_ssh.sh +++ b/001_ssh.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -sed -i 's,^\(PasswordAuthentication \).*,\1'yes',' /etc/ssh/sshd_config -/etc/init.d/ssh restart +sudo sed -i 's,^\(PasswordAuthentication \).*,\1'yes',' /etc/ssh/sshd_config +sudo etc/init.d/ssh restart bash -c "cat > ~/.ssh/config" <<'EOF' Host * diff --git a/010_generate-ssh.sh b/010_generate-ssh.sh index 9395df7..b262383 100755 --- a/010_generate-ssh.sh +++ b/010_generate-ssh.sh @@ -37,12 +37,12 @@ EOF DEST=${1:-/etc/skel} cat > ${DEST}/.zprofile <<'EOF' -if [ -f ${HOME}/.ssh/id_rsa.pub ]; then - chmod 644 ${HOME}/.ssh/id_rsa.pub +if [ -f ${DEST}/.ssh/id_rsa.pub ]; then + chmod 644 ${DEST}/.ssh/id_rsa.pub else echo "Generating ssh keys." ssh-keygen -q -t rsa -N '' -f ${HOME}/.ssh/id_rsa 2>/dev/null <<< y >/dev/null - chmod 644 ${HOME}/.ssh/id_rsa.pub + chmod 644 ${DEST}/.ssh/id_rsa.pub fi EOF @@ -52,7 +52,7 @@ chmod +x ${DEST}/.zprofile ssh-keygen -A # Root user keys -ssh-keygen -q -t rsa -N '' -f ${HOME}/.ssh/id_rsa 2>/dev/null <<< y >/dev/null +ssh-keygen -q -t rsa -N '' -f ${DEST}/.ssh/id_rsa 2>/dev/null <<< y >/dev/null # Do this for any server you want to connect to without interaction. # ssh-keyscan git.ring-zero.co.uk >> ~/.ssh/known_hosts diff --git a/020_docker.sh b/020_docker.sh index c527dab..841faf1 100755 --- a/020_docker.sh +++ b/020_docker.sh @@ -32,6 +32,7 @@ apt install -y \ apt-transport-https \ ca-certificates \ curl \ + pass \ gnupg2 \ software-properties-common apt install -y docker-ce docker-ce-cli containerd.io diff --git a/020_vim.sh b/020_vim.sh index 854295a..2f582d7 100755 --- a/020_vim.sh +++ b/020_vim.sh @@ -166,7 +166,7 @@ Plugin 'VundleVim/Vundle.vim' " plugin on GitHub repos Plugin 'joonty/vdebug' -Plugin 'voldikiss/vim-floaterm' +Plugin 'voldikss/vim-floaterm' Plugin 'tpope/vim-fugitive' Plugin 'jreybert/vimagit' Plugin 'wincent/command-t' diff --git a/020_zsh_quickstart.sh b/020_zsh_quickstart.sh index ba81828..9d7a5cc 100755 --- a/020_zsh_quickstart.sh +++ b/020_zsh_quickstart.sh @@ -10,7 +10,7 @@ #sudo apt update #sudo apt install zsh-completions -apt install -y zsh nodejs zsh-theme-powerlevel9k +sudo apt install -y zsh nodejs zsh-theme-powerlevel9k set -x # compaudit # There are insecure directories: /usr/local/share/zsh/site-functions @@ -28,7 +28,7 @@ DEST=${1:-/etc/skel} HOME=${DEST} ALIAS_DIR=".zshrc.d" -apt install -y git +sudo apt install -y git # Install zgen plugin manager and zsh quicktart to get a default setup for zsh git clone https://github.com/tarjoilija/zgen ${DEST}/zgen # available with apt install zgen which installs to /usr/share/zgen git clone https://github.com/unixorn/zsh-quickstart-kit ${DEST}/zsh-quickstart-kit @@ -212,7 +212,7 @@ EOF #echo 'QUICKSTART_KIT_REFRESH_IN_DAYS=30' >> ~/.zshrc.d/001_quickstart-refresh.zsh echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' > ${DEST}/.zshrc.d/001_zgen-refresh.zsh -apt install -y fonts-powerline powerline +sudo apt install -y fonts-powerline powerline # sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc # Use powerline-daemon to speedup the prompt.