Archived
1
0

Mege with extenal repo

This commit is contained in:
2023-05-21 17:41:57 +02:00
parent 68d18a78c0
commit 53b2b5e849
18 changed files with 1051 additions and 0 deletions

33
scripts/detect-os-V1.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
source /etc/os-release
#echo used Vars for testing only
echo $VERSION
#formaring $VERSION to a useable fromat
VERSION=$(echo $VERSION | grep -o '[0-9]\+.' | tr -d '\n')
#echo used Vars for testing only
echo $ID
echo $VERSION
#example if statement
if [ "$ID" = "debian" ]; then
echo "Execute Commands"
elif [ "$ID" = "ubuntu" ]; then
echo "Executue Ubuntu version detection"
if [[ "$VERSION" == "18.04"* ]]; then
echo "this ubuntu Ubuntu 18.04"
elif [[ "$VERSION" == "16.04"* ]]; then
echo "this ubuntu 16.04"
else
echo "this version of ubuntu is not yet supported"
fi
elif [ "$ID" = "centos" ]; then
echo "Executue Centos Commands"
elif [ "$ID" = "rhel" ]; then
echo "Executue Red hat enterpise Linux Commands"
else
echo "this OS is not yet supported"
fi