Update update.sh

This commit is contained in:
2019-01-07 16:14:45 -05:00
parent bfdda3b674
commit bf29cd0c37

View File

@@ -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 ~