IQDesk Enterprise for RHEL / Rocky Linux / AlmaLinux - one-step installer
============================================================================

This zip bundles the same .rpm packages from the manual install guide
(docs/installation-guide.md) with a single script that does every step for you: adds the
PostgreSQL (PGDG) and EPEL repositories, sets the license-acceptance variable on your behalf
once you've agreed to it below, and installs everything together in one dnf transaction.

INSTALL
-------
1. Extract this zip anywhere, e.g.:
       unzip IQDesk-Enterprise-RHEL.zip -d IQDeskInstall && cd IQDeskInstall
2. Run as root:
       sudo ./install-iqdesk.sh
3. Read the License Agreement it prints, then type "yes" to continue. That's the only
   question you'll be asked - everything else uses IQDesk's own recommended defaults:
   bundled PostgreSQL database + antivirus, and an auto-generated administrator password.
4. When it finishes, visit https://<this-server>:8444 in a browser. Login is tenant
   "default", user "admin" - the password is in /etc/iqdesk/iqdesk.env (root-only) if one
   wasn't set explicitly.

REQUIREMENTS
------------
- RHEL 9+, Rocky Linux 9+, or AlmaLinux 9+, x86_64.
- Root access (sudo).
- Outbound internet access during install - this script adds and pulls from the PostgreSQL
  project's own PGDG repo (bundled database) and EPEL (ClamAV). This is different from the
  Windows installer, which bundles PostgreSQL as offline binaries. If this machine has no
  internet access, see "EXTERNAL DATABASE" below, or install from an internal mirror that
  already has these packages.

OPTIONS
-------
    sudo ./install-iqdesk.sh --with-redis
        Also installs the bundled Redis package (opt-in - a single server doesn't need a
        separate cache service; only add this for a multi-instance HA deployment).

    sudo ./install-iqdesk.sh --yes
        Skips the interactive prompt - use only if you've already read
        terms-and-conditions.txt (also in this folder) and are scripting the install
        end-to-end yourself.

EXTERNAL DATABASE
-----------------
Already run your own PostgreSQL server? Skip the bundled one and the PGDG repo step entirely:
    sudo ./install-iqdesk.sh --external-db-host=your-postgres-host --external-db-password=YourExistingDbPassword

UPGRADING
---------
Re-running this script (or a newer release's copy of it) against an existing install is safe -
it never touches your existing PostgreSQL data or already-generated secrets, the same as a
plain `dnf install` upgrade would be.

UNINSTALL
---------
    sudo dnf remove iqdesk-api iqdesk-postgresql-bundled iqdesk-antivirus-bundled iqdesk-redis-bundled
This never deletes /var/lib/iqdesk (your data, backups, certs) or PostgreSQL/ClamAV themselves.

TROUBLESHOOTING
----------------
- Full manual, step-by-step flow (what this script automates): docs/installation-guide.md in
  the source repository, or ask NurIQ support for a copy.
- Service status: systemctl status iqdesk-api
- Application config (root-only): /etc/iqdesk/iqdesk.env
- Without IQDESK_ACCEPT_TERMS=yes, package files land on disk but nothing is configured -
  re-run this script, or manually:
       sudo IQDESK_ACCEPT_TERMS=yes dnf reinstall iqdesk-api
