feat: Detect Docker Destop

This commit is contained in:
Kroese 2025-04-07 16:59:55 +02:00 committed by GitHub
parent e6f351a912
commit ba8f0e4029
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -338,17 +338,17 @@ closeNetwork() {
checkOS() { checkOS() {
local name local kernel
local os="" local os=""
local if="macvlan" local if="macvlan"
name=$(uname -a) kernel=$(uname -a)
[[ "${name,,}" == *"darwin"* ]] && os="Docker Desktop for macOS" [[ "${kernel,,}" == *"darwin"* ]] && os="Docker Desktop for macOS"
[[ "${name,,}" == *"microsoft"* ]] && os="Docker Desktop for Windows" [[ "${kernel,,}" == *"microsoft"* ]] && os="Docker Desktop for Windows"
if [[ "$DHCP" == [Yy1]* ]]; then if [[ "$DHCP" == [Yy1]* ]]; then
if="macvtap" if="macvtap"
[[ "${name,,}" == *"synology"* ]] && os="Synology Container Manager" [[ "${kernel,,}" == *"synology"* ]] && os="Synology Container Manager"
fi fi
if [ -n "$os" ]; then if [ -n "$os" ]; then