From bf29cd0c37822708a2e7d14cff448e265c4969a1 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Mon, 7 Jan 2019 16:14:45 -0500 Subject: [PATCH] Update update.sh --- update.sh | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/update.sh b/update.sh index f1791e3..1588e28 100644 --- a/update.sh +++ b/update.sh @@ -9,21 +9,6 @@ if [ "$EUID" -ne 0 ]; then exit fi -all_distros () { - # clone the homelab scripts for use later - cd /opt - git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts.git - - # install neofetch - cd /opt - git clone https://github.com/dylanaraps/neofetch.git - cd /opt/neofetch - make install - - # go to home directory - cd ~ -} - # Debian OS if [ -f /etc/debian_version ]; then # upgrade all packages @@ -42,8 +27,6 @@ if [ -f /etc/debian_version ]; then # modify ssh to allow root login and then restart the service sed --in-place "s/^.PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/" /etc/ssh/sshd_config systemctl restart sshd - - all_distros # CentOS OS elif [ -f /etc/redhat-release ]; then @@ -69,10 +52,22 @@ elif [ -f /etc/redhat-release ]; then # modify ssh to allow root login and then restart the service sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config systemctl restart sshd - - all_distros else echo "Unable to determine linux distro" exit fi + + +# clone the homelab scripts for use later +cd /opt +git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts.git + +# install neofetch +cd /opt +git clone https://github.com/dylanaraps/neofetch.git +cd /opt/neofetch +make install + +# go to home directory +cd ~