Cleaned up and merge other Linux snippit repo

Meged https://git.bprieshof.nl/brammp/linux into ./Linux
This commit is contained in:
2023-11-17 00:05:49 +01:00
parent 0638efa018
commit 9fb35960f9
53 changed files with 1851 additions and 7 deletions

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