-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: KMAnju-2021 <[email protected]>
- Loading branch information
1 parent
b5f3713
commit 33a2b50
Showing
4 changed files
with
123 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! command -v ipset >/dev/null 2>&1; then | ||
echo "ipset not found. Installing..." | ||
if command -v apt >/dev/null 2>&1; then | ||
sudo apt update && sudo apt install -y ipset | ||
elif command -v yum >/dev/null 2>&1; then | ||
sudo yum install -y ipset | ||
elif command -v dnf >/dev/null 2>&1; then | ||
sudo dnf install -y ipset | ||
elif command -v pacman >/dev/null 2>&1; then | ||
sudo pacman -S --noconfirm ipset | ||
elif command -v zypper >/dev/null 2>&1; then | ||
sudo zypper install -y ipset | ||
else | ||
echo "Package manager not supported. Please install ipset manually." | ||
exit 1 | ||
fi | ||
else | ||
echo "ipset is already installed." | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters