-
Notifications
You must be signed in to change notification settings - Fork 471
/
Copy pathinstaller.sh
executable file
·48 lines (37 loc) · 1.6 KB
/
installer.sh
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
48
#!/bin/bash
# Ensure we are being ran as root
if [ $(id -u) -ne 0 ]; then
echo "This script must be ran as root"
exit 1
fi
# For upgrades and sanity check, remove any existing i2p.list file
rm -f /etc/apt/sources.list.d/i2p.list
# Install gnupg if not installed
if ! command -v gpg; then
apt-get update
apt-get install -y gnupg
fi
# Compile the i2p ppa
echo "deb [signed-by=/usr/share/keyrings/i2p-archive-keyring.gpg] https://deb.i2p.net/ $(dpkg --status tzdata | grep Provides | cut -f2 -d'-') main" > /etc/apt/sources.list.d/i2p.list
curl -o i2p-archive-keyring.gpg https://geti2p.net/_static/i2p-archive-keyring.gpg
chmod 644 i2p-archive-keyring.gpg
mv i2p-archive-keyring.gpg /usr/share/keyrings
apt-get update # Update repos
apt-get install -y secure-delete tor i2p i2p-router # install dependencies, just in case
# Configure and install the .deb
chmod 755 -R kali-anonsurf-deb-src/DEBIAN # Ensure the DEBIAN folder is executable
# Check if fakeroot is installed
if command -v fakeroot > /dev/null; then
echo "fakeroot is available, using it to build the .deb package."
fakeroot dpkg-deb -b kali-anonsurf-deb-src/ kali-anonsurf.deb
else
echo "fakeroot is not available, building the .deb package without it."
dpkg-deb -b kali-anonsurf-deb-src/ kali-anonsurf.deb
fi
dpkg -i kali-anonsurf.deb || (apt-get -f install && dpkg -i kali-anonsurf.deb) # this will automatically install the required packages
# Check if kali-anonsurf package is already installed
if ! dpkg -l | grep -qw kali-anonsurf; then
echo "The package 'kali-anonsurf' did not install successfully."
exit 1
fi
exit 0