-
Notifications
You must be signed in to change notification settings - Fork 1
/
remove-twonky.sh
39 lines (33 loc) · 909 Bytes
/
remove-twonky.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
#!/bin/bash
#set -x
#trap read debug
grep uuid /etc/twonky/twonkyserver.ini >> uuid_number.txt
# remove from init
sudo systemctl stop twonky
sudo systemctl disable twonky
# shutdown any running servers
sudo killall -s TERM twonkystarter
sudo killall -s TERM twonky
# remove anything that the install script creates
sudo rm /etc/systemd/system/twonky.service
sudo rm -rf /var/run/twonky
sudo rm -rf /var/opt/twonky
sudo rm -rf /var/log/twonky
sudo rm -rf /etc/twonky
sudo rm -rf /opt/twonky
sudo userdel -r -f twonky
# reload systemd service configurations
sudo systemctl daemon-reload
# remove things that might have been accidentally created
if [ -e /etc/twonkyserver.ini ]
then
sudo rm /etc/twonkyserver.ini
fi
if [ -e /var/run/mediaserver.pid ]
then
sudo rm /var/run/mediaserver.pid
fi
if [ -e /var/run/twonky-mediaserver.pid ]
then
sudo rm /var/run/twonky-mediaserver.pid
fi