16 lines
375 B
Bash
16 lines
375 B
Bash
#!/bin/bash
|
|
#CTID=$1
|
|
CTID=100
|
|
DIST=$(pct exec $CTID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)
|
|
|
|
|
|
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
|