1
0
Fork 0
mirror of synced 2025-04-05 06:03:33 +03:00
This commit is contained in:
Fastidious 2017-06-06 06:39:09 +00:00 committed by GitHub
commit c0480a90ab

View file

@ -46,6 +46,13 @@ check_ip() {
printf %s "$1" | tr -d '\n' | grep -Eq "$IP_REGEX"
}
if [ ! -x /usr/bin/lsb_release ]
then
echo "The lsb_release command was not found." >&2
echo "Installing lsb-release, Please Wait..."
apt-get -y install lsb-release || exiterr2
fi
os_type="$(lsb_release -si 2>/dev/null)"
if [ -z "$os_type" ]; then
[ -f /etc/os-release ] && os_type="$(. /etc/os-release && echo "$ID")"