Last active
October 6, 2022 06:58
-
-
Save alanhg/b861c85afa1887daa053ad90fa930453 to your computer and use it in GitHub Desktop.
install-package-certbot.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sudo sh -c "$(curl -fsSL https://gist.githubusercontent.com/alanhg/b861c85afa1887daa053ad90fa930453/raw/b9abe224631981fafd184de4b5b87d3fe12d3eaa/install-package-certbot.sh)" | |
YUM_CMD=$(which yum) | |
APT_GET_CMD=$(which apt-get) | |
APT_CMD=$(which apt) | |
PACKAGE=certbot | |
if [ ! -z $YUM_CMD ]; then | |
yum install -y $PACKAGE | |
elif [ ! -z $APT_GET_CMD ]; then | |
apt-get install -y $PACKAGE | |
elif [ ! -z $APT_CMD ]; then | |
apt install -y $PACKAGE | |
else | |
echo "error can't install package $PACKAGE" | |
exit 1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment