Skip to content

Install & Setup Commands

This section documents the first-run lifecycle commands in util.sh.

safecall system install

Phase 1 installer. It creates an installation directory, installs the binary, places CLI scripts, writes default configuration, and records checksums/version.

Usage

bash
sudo ./util.sh system install
sudo ./util.sh system install --dir /opt/safecall-prod
sudo ./util.sh system install --service-name safecall-prod
sudo ./util.sh system install --offline-dir /path/to/offline-bundle

Options

OptionMeaning
--dir <directory>Installation target directory (default /opt/safecall)
--service-name <name>Service/CLI name for multi-instance deployments
--offline-dir <path>Use a local offline bundle instead of update server downloads

When to use

  • New installation on a host.
  • Re-installing into a new directory for parallel instances.
  • Offline deployment from pre-downloaded artifacts.

Important behavior

  • Does not complete service/proxy/cron setup by itself.
  • Writes .service_name if --service-name is provided so later commands use the same service identity.
  • Generates util.sh, stores version.txt, and records checksums.json.

safecall system setup

Phase 2 setup wizard. It applies service/runtime choices and optional integrations.

Usage

bash
sudo ./util.sh system setup
sudo ./util.sh system setup --defaults
sudo ./util.sh system setup --service-name safecall-prod

Options

OptionMeaning
--defaultsAccept default answers and skip interactive prompts
--service-name <name>Override persisted service name

What setup does

  1. Loads existing config when present (supports config/main.config.json and legacy main.config.json).
  2. Merges defaults + existing config + wizard choices.
  3. Persists service name into .service_name.
  4. Optionally registers systemd service.
  5. Optionally runs reverse proxy integration.
  6. Optionally sets up daily update cron.
  7. Runs self-test.

Feature selection behavior

Setup supports these server feature profiles:

  • bridge
  • navigation
  • alerting
  • rtls
  • sensors
  • safecall (all server features)
  • bridge + safecall

Use this when deploying partial feature sets.

safecall system systemd

Registers/rebuilds systemd service and CLI symlink.

Usage

bash
sudo ./util.sh system systemd
sudo ./util.sh system systemd --user safecall

Option

OptionMeaning
--user <user>Run service as a specific Unix user

What it configures

  • /etc/systemd/system/<service_name>.service
  • /usr/local/bin/<service_name> -> <install_dir>/util.sh
  • systemctl daemon-reload and systemctl enable --now <service_name>

When to use

  • After changing service user.
  • After manual service file damage.
  • During recovery workflows when you want to recreate service wiring only.