-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
50 lines (43 loc) · 1.8 KB
/
install.sh
File metadata and controls
50 lines (43 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
function install() {
if ! command -v curl > /dev/null; then
# Try to install curl
sh -c "(apt update && apt install -y curl) || yum install -y curl || apk add curl"
fi
apt install zenity
chattr -i /usr/bin/tuxprotect
cp tuxprotect /usr/bin/tuxprotect
cp tuxprotectgui /usr/bin/tuxprotectgui
chmod +x /usr/bin/tuxprotect
chmod +x /usr/bin/tuxprotectgui
mkdir /usr/share/tuxprotect/
cp restartservices.sh /usr/share/tuxprotect/restartservices
cp notification.sh /usr/share/tuxprotect/notification
chmod +x /usr/share/tuxprotect/restartservices
chmod +x /usr/share/tuxprotect/notification
cp -r res /usr/share/tuxprotect/res/
bash /usr/bin/tuxprotect &
}
echo '
#######################################################
# #
# Tux Protect #
# #
#######################################################'
echo 'You are trying to install "Tux Protect".
WARNING!!! This script was tested only with Ubuntu 22.10 ! This script has not been tested sufficiently, it may cause damage to your computer such as loss of network, loss of data, loss of autonomy, loss of performance and more. No uninstall tool will be provided.
This script updates itself, its behavior is subject to change over time.
Do you agree anyway? If yes, write "I agree"'
echo '#######################################################'
read response
if [ "$response" = "I agree" ] || [ "$response" = "i agree" ]; then
if [[ $EUID -ne 0 ]]; then
echo "Error! You have tu run this script with root privilege, run sudo ./install.sh"
exit 1
else
install
fi
echo "Tux Protect was installed succesffuly ! You're now protected :)"
else
echo "The Script was not installed."
fi