2080-install-i2p 710 Bytes
Newer Older
Kill Your TV's avatar
Kill Your TV committed
1
2
3
4
5
#!/bin/sh

# This script reverses everything done by config/chroot_local-hooks/97_remove_i2p
# when the string "i2p" is added to the boot prompt.

6
7
8
# Import i2p_is_enabled().
. /usr/local/lib/tails-shell-library/i2p.sh

9
SRC="/usr/share/tails/i2p-disabled"
Kill Your TV's avatar
Kill Your TV committed
10
11
12

Install_I2P(){
    mv "$SRC/wrapper" /usr/sbin/wrapper
13
    mv "$SRC/i2p-browser.desktop" /usr/share/applications
14
15
    mv "$SRC/i2p" /usr/share
    rmdir "$SRC"
Kill Your TV's avatar
Kill Your TV committed
16
17
18
}

Add_Sudo_Config(){
Kill Your TV's avatar
Kill Your TV committed
19
20
21
    echo "amnesia   ALL = NOPASSWD: /usr/local/sbin/i2p-browser" > /etc/sudoers.d/zzz_i2pbrowser
    chown root:root /etc/sudoers.d/zzz_i2pbrowser
    chmod 0440 /etc/sudoers.d/zzz_i2pbrowser
Kill Your TV's avatar
Kill Your TV committed
22
23
}

24
if i2p_is_enabled && [ -d "$SRC" ]; then
25
26
27
   Install_I2P
   Add_Sudo_Config
fi