Add installer and uninstaller script

This commit is contained in:
2025-11-16 19:07:37 +07:00
parent fa0fce5e06
commit 4f9a72c8df
4 changed files with 107 additions and 6 deletions

27
uninstall.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
INSTALL_DIR="/usr/local/bin"
BINARY_NAME="proxmox-cloud-image"
echo "=========================================="
echo "Proxmox Cloud Image Tool Uninstaller"
echo "=========================================="
echo ""
if [ "$EUID" -ne 0 ]; then
echo "Error: This script must be run as root (use sudo)"
exit 1
fi
if [ -f "$INSTALL_DIR/$BINARY_NAME" ]; then
echo "Removing $INSTALL_DIR/$BINARY_NAME..."
rm -f "$INSTALL_DIR/$BINARY_NAME"
echo "Uninstallation completed successfully!"
else
echo "Binary not found at $INSTALL_DIR/$BINARY_NAME"
echo "Nothing to uninstall."
fi
echo ""