Update update.sh
This commit is contained in:
33
update.sh
33
update.sh
@@ -9,21 +9,6 @@ if [ "$EUID" -ne 0 ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
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
|
# Debian OS
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
# upgrade all packages
|
# upgrade all packages
|
||||||
@@ -42,8 +27,6 @@ if [ -f /etc/debian_version ]; then
|
|||||||
# modify ssh to allow root login and then restart the service
|
# modify ssh to allow root login and then restart the service
|
||||||
sed --in-place "s/^.PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/" /etc/ssh/sshd_config
|
sed --in-place "s/^.PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/" /etc/ssh/sshd_config
|
||||||
systemctl restart sshd
|
systemctl restart sshd
|
||||||
|
|
||||||
all_distros
|
|
||||||
|
|
||||||
# CentOS OS
|
# CentOS OS
|
||||||
elif [ -f /etc/redhat-release ]; then
|
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
|
# modify ssh to allow root login and then restart the service
|
||||||
sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config
|
sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config
|
||||||
systemctl restart sshd
|
systemctl restart sshd
|
||||||
|
|
||||||
all_distros
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Unable to determine linux distro"
|
echo "Unable to determine linux distro"
|
||||||
exit
|
exit
|
||||||
fi
|
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 ~
|
||||||
|
|||||||
Reference in New Issue
Block a user