Last active
October 16, 2019 09:40
-
-
Save ismail0352/e558599acc54af1bfc54913189ad1a78 to your computer and use it in GitHub Desktop.
Shell script for determining undelying distribution using ID
This file contains hidden or 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/bash | |
DISTRO_ID=$(awk -F= '/^ID=/{print $2}' /etc/os-release | sed -e 's/^"//' -e 's/"$//') | |
# Install Salt Minion | |
if [ $DISTRO_ID == centos ]; then | |
echo "Do CENTOS stuff here" | |
elif [ $DISTRO_ID == ubuntu ]; then | |
echo "Do UBUNTU stuff here" | |
else | |
echo "OS not supported" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment