-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
33 lines (27 loc) · 986 Bytes
/
Copy pathuninstall.sh
File metadata and controls
33 lines (27 loc) · 986 Bytes
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
#!/bin/bash
echo "🛑 Stopping FileBrowser Quantum service..."
sudo systemctl stop filebrowser-quantum 2>/dev/null
sudo systemctl disable filebrowser-quantum 2>/dev/null
SERVICE_FILE="/etc/systemd/system/filebrowser-quantum.service"
if [ -f "$SERVICE_FILE" ]; then
echo "Removing systemd service..."
sudo rm -f "$SERVICE_FILE"
sudo systemctl daemon-reload
fi
FB_ROOT="/opt/filebrowser_quantum"
DATA_DIR="/filebrowser_quantum_data"
echo "Removing FileBrowser files..."
sudo rm -rf "$FB_ROOT"
if [[ -d "$DATA_DIR" ]]; then
read -p "Do you want to remove the data directory '$DATA_DIR'? [y/N]: " REMOVE_DATA
REMOVE_DATA=${REMOVE_DATA,,}
if [[ "$REMOVE_DATA" == "y" || "$REMOVE_DATA" == "yes" ]]; then
echo "Removing data directory..."
sudo rm -rf "$DATA_DIR"
else
echo "Skipping data directory."
fi
else
echo "Data directory '$DATA_DIR' does not exist. Skipping."
fi
echo "✅ FileBrowser Quantum has been uninstalled."