15 lines
400 B
Bash
15 lines
400 B
Bash
#!/bin/bash
|
|
#VMID=$1
|
|
VMID=100
|
|
DIST=$(qm guest exec $VMID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release | jq '.["out-data"]')
|
|
|
|
if [[ "${DIST}" == *"ubuntu"* ]] || [[ "${DIST}" == *"debian"* ]]; then
|
|
echo "Apt Detected"
|
|
elif [[ "${DIST}" == *"alpine"* ]]; then
|
|
echo "APK Detected"
|
|
#elif [[ "${DIST}" == *"centos"* ]]; then
|
|
# echo "DNF Detected"
|
|
else
|
|
echo "Package manager in not supported"
|
|
fi
|