Fix install/uninstall display text to show GNIZA

This commit is contained in:
shuki
2026-03-05 21:19:47 +02:00
parent f1e7682f21
commit 438724de3b
2 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# gniza4cp installer — from a local clone: # GNIZA installer — from a local clone:
# bash scripts/install.sh # bash scripts/install.sh
set -eo pipefail set -eo pipefail
@@ -19,7 +19,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd)" || true
if [[ -n "${SCRIPT_DIR:-}" && -f "$SCRIPT_DIR/../bin/gniza4cp" ]]; then if [[ -n "${SCRIPT_DIR:-}" && -f "$SCRIPT_DIR/../bin/gniza4cp" ]]; then
SOURCE_DIR="$(dirname "$SCRIPT_DIR")" SOURCE_DIR="$(dirname "$SCRIPT_DIR")"
else else
echo "Cloning gniza4cp..." echo "Cloning GNIZA..."
TMPDIR_CLONE="$(mktemp -d)" TMPDIR_CLONE="$(mktemp -d)"
git clone --depth 1 "$REPO_URL" "$TMPDIR_CLONE" 2>&1 git clone --depth 1 "$REPO_URL" "$TMPDIR_CLONE" 2>&1
SOURCE_DIR="$TMPDIR_CLONE" SOURCE_DIR="$TMPDIR_CLONE"
@@ -64,7 +64,7 @@ cp "$INSTALL_DIR/etc/schedule.conf.example" /etc/gniza4cp/schedule.conf.example
# Create log directory # Create log directory
mkdir -p /var/log/gniza4cp mkdir -p /var/log/gniza4cp
echo "gniza4cp installed successfully!" echo "GNIZA installed successfully!"
# ── WHM Plugin (if cPanel/WHM is present) ───────────────────── # ── WHM Plugin (if cPanel/WHM is present) ─────────────────────
WHM_CGI_DIR="/usr/local/cpanel/whostmgr/docroot/cgi" WHM_CGI_DIR="/usr/local/cpanel/whostmgr/docroot/cgi"
@@ -84,7 +84,7 @@ if [[ -d "$WHM_CGI_DIR" ]]; then
"$WHM_CGI_DIR/gniza4cp-whm/assets/package.json" \ "$WHM_CGI_DIR/gniza4cp-whm/assets/package.json" \
"$WHM_CGI_DIR/gniza4cp-whm/assets/package-lock.json" 2>/dev/null || true "$WHM_CGI_DIR/gniza4cp-whm/assets/package-lock.json" 2>/dev/null || true
/usr/local/cpanel/bin/register_appconfig "$WHM_CGI_DIR/gniza4cp-whm/gniza4cp-whm.conf" /usr/local/cpanel/bin/register_appconfig "$WHM_CGI_DIR/gniza4cp-whm/gniza4cp-whm.conf"
echo "WHM plugin installed — access via WHM > Plugins > gniza4cp Backup Manager" echo "WHM plugin installed — access via WHM > Plugins > GNIZA Backup Manager"
else else
echo "WHM not detected, skipping WHM plugin installation." echo "WHM not detected, skipping WHM plugin installation."
fi fi
@@ -129,11 +129,11 @@ if [[ -d "$CPANEL_BASE" ]]; then
[[ -n "$user" ]] && cpapi2 --user="$user" Branding gensprites 2>/dev/null || true [[ -n "$user" ]] && cpapi2 --user="$user" Branding gensprites 2>/dev/null || true
done < /etc/trueuserdomains done < /etc/trueuserdomains
fi fi
echo "cPanel user plugin installed — users will see gniza4cp Restore in Files section" echo "cPanel user plugin installed — users will see GNIZA Restore in Files section"
else else
echo "cPanel not detected, skipping cPanel user plugin installation." echo "cPanel not detected, skipping cPanel user plugin installation."
fi fi
echo "" echo ""
echo "Next steps:" echo "Next steps:"
echo " Open WHM → GNIZA4CP Backup Manager to configure via the setup wizard." echo " Open WHM → GNIZA Backup Manager to configure via the setup wizard."

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# gniza4cp uninstall script # GNIZA uninstall script
set -euo pipefail set -euo pipefail
@@ -11,7 +11,7 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
echo "Uninstalling gniza4cp..." echo "Uninstalling GNIZA..."
# Remove symlink # Remove symlink
if [[ -L "$BIN_LINK" ]]; then if [[ -L "$BIN_LINK" ]]; then
@@ -27,7 +27,7 @@ fi
# ── Remove cron entries ─────────────────────────────────────── # ── Remove cron entries ───────────────────────────────────────
if crontab -l 2>/dev/null | grep -q '# gniza4cp:'; then if crontab -l 2>/dev/null | grep -q '# gniza4cp:'; then
echo "Removing gniza4cp cron entries..." echo "Removing GNIZA cron entries..."
crontab -l 2>/dev/null | grep -v '# gniza4cp:' | grep -v '/usr/local/bin/gniza4cp' | crontab - crontab -l 2>/dev/null | grep -v '# gniza4cp:' | grep -v '/usr/local/bin/gniza4cp' | crontab -
echo "Cron entries removed." echo "Cron entries removed."
fi fi
@@ -66,7 +66,7 @@ if [[ -d "$ADMINBIN_DIR" ]]; then
fi fi
echo "" echo ""
echo "gniza4cp uninstalled." echo "GNIZA uninstalled."
echo "" echo ""
echo "The following were NOT removed (manual cleanup if desired):" echo "The following were NOT removed (manual cleanup if desired):"
echo " /etc/gniza4cp/ (configuration + remotes.d/)" echo " /etc/gniza4cp/ (configuration + remotes.d/)"