-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.sh
executable file
·38 lines (30 loc) · 991 Bytes
/
uninstall.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
#!/bin/bash
# Check for root privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
echo "Stopping and disabling services..."
systemctl stop dictation_tray
systemctl disable dictation_tray
systemctl stop dictation
systemctl disable dictation
echo "Removing systemd service files..."
rm -f /etc/systemd/system/dictation.service
rm -f /etc/systemd/system/dictation_tray.service
systemctl daemon-reload
echo "Removing executables and icons..."
rm -f /usr/local/bin/dictation_daemon.py
rm -f /usr/local/bin/dictation_client.py
rm -f /usr/local/bin/dictation_tray_daemon.py
rm -f /usr/local/bin/dictation.sh
rm -f /usr/local/bin/red-circle.png
rm -f /usr/local/bin/grey-circle.png
echo "Removing virtual environment and dependencies..."
rm -rf /opt/dictation_venv
echo "Removing whisper cache and models..."
rm -rf /var/cache/whisper
echo "Removing socket if it exists..."
rm -f /tmp/dictation_tray.sock
rm -f /tmp/dictation.sock
echo "Uninstallation complete"