-
Notifications
You must be signed in to change notification settings - Fork 0
/
restore-mumble.sh
executable file
·48 lines (42 loc) · 1.6 KB
/
restore-mumble.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
TORRC_ROOT=/etc/tor
ETC_ROOT=/etc
HSDIR_ROOT=/var/lib/tor
PERSISTENT_ROOT=/home/amnesia/Persistent
ONION_URL='-'
# Move folder and files needes from Persistent location to respective
# OS locations for order to host Mumble hidden service.
cp -avr ${PERSISTENT_ROOT}/mumble-server ${HSDIR_ROOT}
cp -pv ${PERSISTENT_ROOT}/mumble-server.ini ${ETC_ROOT}
cp -pv ${PERSISTENT_ROOT}/torrc ${TORRC_ROOT}
## Restart Tor service to initialize Mumble hidden service
echo "Restarting Tor service"
systemctl restart tor
for i in {1..6}
do
if [ -f ${HSDIR_ROOT}/mumble-server/hostname ];
then
echo "Mumble Hidden Service hosted successfully!!!"
break
fi
echo "Mumble Hidden Service not yet running, please wait... attempt ${i}/6"
sleep 5
done
## Get the Mumble Hidden Service URL and display it to the user
if [ -f ${HSDIR_ROOT}/mumble-server/hostname ];
then
ONION_URL=$(cat ${HSDIR_ROOT}/mumble-server/hostname)
echo ${ONION_URL} | xclip -selection c
echo "******************************************************************"
echo "Onion HiddenService URL: ${ONION_URL} was copied to clipboard"
echo "******************************************************************"
echo
echo "************************************************"
echo " Please run Mumble from a non-root shell"
echo "************************************************"
else
echo "************************************************"
echo "Mumble Hidden Service hosting failed!!!"
echo "Please check the system and try again..."
echo "************************************************"
fi