added CA
This commit is contained in:
12
update.sh
12
update.sh
@@ -3,6 +3,8 @@
|
||||
# Update and isntall the packages unsed in my homelab
|
||||
# run "curl -L https://johnhgaunt.com/update.sh | bash" as root to use this script
|
||||
|
||||
GAUNT_CA_CERT_NAME="GauntDC01-CA.crt"
|
||||
|
||||
# need to be root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
@@ -27,6 +29,10 @@ 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
|
||||
|
||||
# GauntDC01-CA
|
||||
curl -o /usr/local/share/ca-certificates/${GAUNT_CA_CERT_NAME} https://johnhgaunt.com/${GAUNT_CA_CERT_NAME}
|
||||
update-ca-certificates
|
||||
|
||||
# CentOS OS
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
@@ -52,6 +58,12 @@ 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
|
||||
|
||||
# GauntDC01-CA
|
||||
curl -o /etc/pki/ca-trust/source/anchors/${GAUNT_CA_CERT_NAME} https://johnhgaunt.com/${GAUNT_CA_CERT_NAME}
|
||||
update-ca-trust
|
||||
|
||||
|
||||
|
||||
else
|
||||
echo "Unable to determine linux distro"
|
||||
|
||||
Reference in New Issue
Block a user