IQDesk Enterprise for Ubuntu / Debian - one-step installer
============================================================

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

INSTALL
-------
1. Extract this zip anywhere, e.g.:
       unzip IQDesk-Enterprise-Ubuntu.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, 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
------------
- Ubuntu 24.04+ or Debian 12+, x86_64.
- Root access (sudo).
- Outbound internet access during install - this script adds and pulls from the PostgreSQL
  project's own apt repository (PGDG) for the bundled database, and pulls ClamAV/Redis from
  your distro's normal archive. 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 apt 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 `apt-get install` upgrade would be.

UNINSTALL
---------
    sudo apt purge 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
- To re-answer the license/component questions by hand instead of via this script:
       sudo dpkg-reconfigure iqdesk-api
