Add Linux deployment scripts
- install.sh: Sets up /opt/kao with systemd service - uninstall.sh: Clean removal - Hide message when optimal (only show when something to report) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
uninstall.sh
Normal file
35
uninstall.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Kao Uninstall Script
|
||||
|
||||
set -e
|
||||
|
||||
INSTALL_DIR="/opt/kao"
|
||||
SERVICE_FILE="/etc/systemd/system/kao.service"
|
||||
|
||||
echo "===================================="
|
||||
echo " Kao Uninstaller"
|
||||
echo "===================================="
|
||||
|
||||
# Check permissions
|
||||
if [ ! -w "/opt" ]; then
|
||||
echo "Error: Need write access"
|
||||
echo "Run with: sudo $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Stop and disable service
|
||||
echo "[1/3] Stopping service..."
|
||||
systemctl stop kao.service 2>/dev/null || true
|
||||
systemctl disable kao.service 2>/dev/null || true
|
||||
|
||||
# Remove service file
|
||||
echo "[2/3] Removing systemd service..."
|
||||
rm -f "$SERVICE_FILE"
|
||||
systemctl daemon-reload
|
||||
|
||||
# Remove install directory
|
||||
echo "[3/3] Removing files..."
|
||||
rm -rf "$INSTALL_DIR"
|
||||
|
||||
echo ""
|
||||
echo "Kao has been uninstalled."
|
||||
Reference in New Issue
Block a user