-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamlined installation process and fixed python runtime error
- Loading branch information
Showing
5 changed files
with
57 additions
and
28 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
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 |
---|---|---|
@@ -1,4 +1,42 @@ | ||
sudo systemctl enable ufw &> /dev/null | ||
sudo ufw enable &> /dev/null | ||
cp build/smother ~/.local/bin | ||
cp build/Smother.desktop ~/.local/share/applications | ||
printf "Please select\n"; | ||
printf "1: Install or update Smother\n"; | ||
printf "2: Uninstall Smother\n"; | ||
printf "> "; | ||
|
||
#Repeat only if the user hasn't entered an integer... | ||
while ! [[ $selection =~ ^[1-2]+$ ]]; | ||
do | ||
read selection; | ||
#if the entered value was not an integer, show this | ||
if ! [[ $selection =~ ^[1-2]+$ ]]; then | ||
sleep 1; | ||
printf "$(tput setaf 9)Please try again$(tput sgr0)\n"; | ||
printf "1: Install or update Smother\n"; | ||
printf "2: Uninstall Smother\n"; | ||
printf "> "; | ||
fi | ||
done | ||
|
||
case $selection in | ||
1) | ||
sudo systemctl enable ufw &> /dev/null | ||
sudo ufw enable &> /dev/null | ||
cp build/smother ~/.local/bin | ||
cp build/Smother.desktop ~/.local/share/applications | ||
;; | ||
|
||
2) | ||
#Uninstall | ||
sudo /usr/bin/ufw --force reset &> /dev/null | ||
sudo /usr/bin/ufw enable &> /dev/null | ||
sudo /usr/bin/rm /etc/ufw/*.rules.* &> /dev/null | ||
sudo /usr/bin/ufw default deny incoming &> /dev/null | ||
sudo /usr/bin/ufw default allow outgoing &> /dev/null | ||
rm ~/.local/bin/smother | ||
rm ~/.local/share/applications/Smother.desktop | ||
;; | ||
|
||
*) | ||
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n"; | ||
;; | ||
esac |
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 was deleted.
Oops, something went wrong.