diff --git a/mbadmin.jps b/mbadmin.jps index 39ee7c3..3dc6934 100644 --- a/mbadmin.jps +++ b/mbadmin.jps @@ -15,31 +15,46 @@ onInstall: - mkdir -p /home/litespeed/mbmanager - mkdir -p /home/litespeed/mbmanager/relay - mkdir -p /home/litespeed/mbmanager/ssl-manager - - cd /home/litespeed/mbmanager/ - # Download WordPress Installer + # Download WordPress Installer with path verification + - cd /home/litespeed/mbmanager - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/install-wordpress.sh - # Download main scripts + - if [ ! -f install-wordpress.sh ]; then echo "Failed to download install-wordpress.sh"; exit 1; fi + # Download main scripts with verification - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/litespeed_fetch_settings.sh + - if [ ! -f litespeed_fetch_settings.sh ]; then echo "Failed to download litespeed_fetch_settings.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/litespeed_update_settings.sh + - if [ ! -f litespeed_update_settings.sh ]; then echo "Failed to download litespeed_update_settings.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/update_opcache_settings.sh - - chmod +x /home/litespeed/mbmanager/*.sh - # Download relay scripts + - if [ ! -f update_opcache_settings.sh ]; then echo "Failed to download update_opcache_settings.sh"; exit 1; fi + - chmod +x *.sh + # Download relay scripts with verification - cd /home/litespeed/mbmanager/relay - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/check_relay_installation.sh + - if [ ! -f check_relay_installation.sh ]; then echo "Failed to download check_relay_installation.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/check_relay_status.sh + - if [ ! -f check_relay_status.sh ]; then echo "Failed to download check_relay_status.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/disable_relay.sh + - if [ ! -f disable_relay.sh ]; then echo "Failed to download disable_relay.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/enable_relay.sh + - if [ ! -f enable_relay.sh ]; then echo "Failed to download enable_relay.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/flush_caches.sh + - if [ ! -f flush_caches.sh ]; then echo "Failed to download flush_caches.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/install_relay_ocp.sh + - if [ ! -f install_relay_ocp.sh ]; then echo "Failed to download install_relay_ocp.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/uninstall_relay.sh - - chmod +x /home/litespeed/mbmanager/relay/*.sh - # Download SSL manager script + - if [ ! -f uninstall_relay.sh ]; then echo "Failed to download uninstall_relay.sh"; exit 1; fi + - chmod +x *.sh + # Download SSL manager script with verification - cd /home/litespeed/mbmanager/ssl-manager - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ssl_manager.sh + - if [ ! -f ssl_manager.sh ]; then echo "Failed to download ssl_manager.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ipchecker.sh + - if [ ! -f ipchecker.sh ]; then echo "Failed to download ipchecker.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ssl_remover.sh + - if [ ! -f ssl_remover.sh ]; then echo "Failed to download ssl_remover.sh"; exit 1; fi - curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/xmlchecker.sh - - chmod +x /home/litespeed/mbmanager/ssl-manager/*.sh + - if [ ! -f xmlchecker.sh ]; then echo "Failed to download xmlchecker.sh"; exit 1; fi + - chmod +x *.sh # Install Certbot for AlmaLinux - dnf install -y certbot - dnf install -y python3-certbot-dns-cloudflare @@ -508,14 +523,14 @@ actions: get_litespeed_ttl_values: - cmd[cp]: commands: - - bash /home/jelastic/mbmanager/litespeed_fetch_settings.sh + - bash /home/litespeed/mbmanager/litespeed_fetch_settings.sh - return: type: info message: "${response.out}" litespeed_update_settings: - cmd[cp]: commands: - - bash /home/jelastic/mbmanager/litespeed_update_settings.sh "${settings.TTL_PUB}" "${settings.TTL_PRIV}" "${settings.TTL_FRONTPAGE}" "${settings.TTL_FEED}" + - bash /home/litespeed/mbmanager/litespeed_update_settings.sh "${settings.TTL_PUB}" "${settings.TTL_PRIV}" "${settings.TTL_FRONTPAGE}" "${settings.TTL_FEED}" - restartNodes: - nodeGroup: "cp" reboot: true @@ -526,7 +541,7 @@ actions: - cmd[cp]: user: root commands: - - bash /home/jelastic/mbmanager/relay/check_relay_installation.sh + - bash /home/litespeed/mbmanager/relay/check_relay_installation.sh - return: type: info message: "${response.out}" @@ -534,7 +549,7 @@ actions: - cmd[cp]: user: root commands: - - bash /home/jelastic/mbmanager/relay/check_relay_status.sh + - bash /home/litespeed/mbmanager/relay/check_relay_status.sh - return: type: info message: "${response.out}" @@ -542,7 +557,7 @@ actions: - cmd[cp]: user: root commands: - - bash /home/jelastic/mbmanager/relay/disable_relay.sh + - bash /home/litespeed/mbmanager/relay/disable_relay.sh - return: type: info message: "${response.out}" @@ -550,21 +565,21 @@ actions: - cmd[cp]: user: root commands: - - bash /home/jelastic/mbmanager/relay/enable_relay.sh + - bash /home/litespeed/mbmanager/relay/enable_relay.sh - return: type: info message: "${response.out}" install_relay: - cmd[cp]: commands: - - bash /home/jelastic/mbmanager/relay/install_relay_ocp.sh + - bash /home/litespeed/mbmanager/relay/install_relay_ocp.sh - return: type: info message: "${response.out}" flush_keys: - cmd[cp]: commands: - - bash /home/jelastic/mbmanager/relay/flush_caches.sh + - bash /home/litespeed/mbmanager/relay/flush_caches.sh - return: type: info message: "${response.out}" @@ -652,7 +667,7 @@ actions: - cmd[cp]: user: root commands: - - cd /home/jelastic/mbmanager/ + - cd /home/litespeed/mbmanager/ - ./install-wordpress.sh --wpusername="${settings.wpusername}" --wppassword="${settings.wppassword}" --wpemail="${settings.wpemail}" - return: type: info