Add full Oculog codebase
This commit is contained in:
41
clients/ubuntu/uninstall.sh
Executable file
41
clients/ubuntu/uninstall.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${YELLOW}Oculog Client Uninstallation${NC}"
|
||||
echo "===================================="
|
||||
echo ""
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "${RED}Please run as root (use sudo)${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Step 1: Stopping and disabling service...${NC}"
|
||||
systemctl stop oculog-client.service 2>/dev/null || true
|
||||
systemctl disable oculog-client.service 2>/dev/null || true
|
||||
|
||||
echo -e "${GREEN}Step 2: Removing systemd service file...${NC}"
|
||||
rm -f /etc/systemd/system/oculog-client.service
|
||||
systemctl daemon-reload
|
||||
|
||||
echo -e "${GREEN}Step 3: Removing symlink...${NC}"
|
||||
rm -f /usr/local/bin/oculog-client
|
||||
|
||||
echo -e "${GREEN}Step 4: Removing installation directory...${NC}"
|
||||
rm -rf /opt/oculog
|
||||
|
||||
echo -e "${YELLOW}Note: Configuration files and logs are preserved:${NC}"
|
||||
echo " - /etc/oculog/client.conf"
|
||||
echo " - /var/log/oculog/client.log"
|
||||
echo ""
|
||||
echo -e "${GREEN}Uninstallation completed!${NC}"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user