Add installer and uninstaller script
This commit is contained in:
27
uninstall.sh
Executable file
27
uninstall.sh
Executable 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 ""
|
||||
Reference in New Issue
Block a user