Skip to content

Commit

Permalink
reorder if
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Feb 22, 2024
1 parent 72c4eaa commit 90e5533
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions advanced/Scripts/speedtestmod/mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ manageHistory() {
}

notInstalled() {
if [ -x "$(command -v yum)" ] || [ -x "$(command -v dnf)" ]; then
rpm -q "$1" &>/dev/null || return 0
elif [ -x "$(command -v apt-get)" ]; then
if [ -x "$(command -v apt-get)" ]; then
dpkg -s "$1" &>/dev/null || return 0
elif [ -x "$(command -v dnf)" ] || [ -x "$(command -v yum)" ]; then
rpm -q "$1" &>/dev/null || return 0
else
echo "Unsupported package manager!"
exit 1
fi

return 1
}

Expand Down
6 changes: 3 additions & 3 deletions advanced/Scripts/speedtestmod/speedtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ swaptest() {
}

notInstalled() {
if [ -x "$(command -v yum)" ] || [ -x "$(command -v dnf)" ]; then
rpm -q "$1" &>/dev/null || return 0
elif [ -x "$(command -v apt-get)" ]; then
if [ -x "$(command -v apt-get)" ]; then
dpkg -s "$1" &>/dev/null || return 0
elif [ -x "$(command -v dnf)" ] || [ -x "$(command -v yum)" ]; then
rpm -q "$1" &>/dev/null || return 0
else
echo "Unsupported package manager!"
mv -f "$out" /var/log/pihole/speedtest.log
Expand Down

0 comments on commit 90e5533

Please sign in to comment.