batm-manage: the CAS CLI Toolkit

The following commands are available to you (and essential) via the batm-manage script.

The "batm-manage" CAS CLI toolkit is automatically installed with CAS on your server.

Sudo (superuser/root) privileges are required on the server to use batm-manage.

Syntax:

sudo /batm/batm-manage [command]

Commands:

[command]

Description & Notes

[command]

Description & Notes

info

Displays the status of individual services and other information.

start master | admin | all

Starts the selected service.

stop master | admin | all

Stops the selected service.

log master | admin

Displays the requested log.

log clear

Deletes all log files.

server-upgrade BUILDNUM

Downloads BUILDNUM from GB and upgrades your CAS.

DOWNGRADING MAY CAUSE DATA LOSS!

terminal-upgrade BUILDNUM SN

Downloads and triggers a BATM firmware upgrade.

  • BUILDNUM is the firmware version,

    • don’t include any “.xx” point release.

  • SN is the BT# serial number (e.g. BT123456).

    • Upgrade multiple BATMs if desired;

    • separate serials with spaces (e.g. BT111 BT222).

dongle version serialno

Downloads and prepares dongle (door sensors) firmware.

  • version is supplied by Support.

  • serialno is the BATM serial number.

reboot serialno1 serialno2

Reboots the specified Terminal(s).

restore-point serialno1 serialno2

Creates a “restore point” for the specified Terminal(s) that will be automatically deployed if the Android system detects an issue with the firmware image.

  • Saves current firmware, Server IP, and Admin QR.

vpn-generate serialno1 serialno2

Generates a VPN certificate for the specified terminal(s).

vpn-revoke serialno1 serialno2

Revokes the VPN key for the specified terminal(s).

vpn-clean

Clears and removes any generated VPN configuration.

See: https://generalbytes.atlassian.net/l/cp/H2MzgMY8

vpn-user-generate name email

Generates a VPN certificate and grants CAS VPN access to name @ email

vpn-user-revoke name

Deletes the VPN certificate and revokes CAS VPN access to name

  • See:

terminal-unpair serialno

Force re-authorization of serialno BATM with CAS.

terminal-hwconf-clear serialno

clears the stored BATM HW configuration for serialno

  • More information:

acceptor billset serialno

Downloads and prepares an acceptor billset update for serialno.

send crashlogs

Sends BATM Crash Logs to support when requested.

  • A “ticket ID” will be required from Support.

  • See:

send serverlogs

Sends CAS Server Logs to support when requested.

  • A “ticket ID” will be required from Support.

  • Sends master & admin logs.

  • See:

send auditlogs

Sends auditlogs to support.

  • A “ticket ID” will be required from Support.

  • See:

send payment fromaddress toaddress amount [fee]

Sends coin from internal wallet when "stuck".

  • Also see below: "show balances".

  • fee [optional] sets the specific forwarding fee for the entire transaction in BTC (not sats, nor “per byte”).

wallet prefix

Generates new wallet with requested prefix.

  • May take a LONG time depending on the prefix size.

  • 2-3 characters (MAX) recommended.

  • Used for branding purposes only.

backup

Creates a backup of the server.

Optionally you may specify what data to backup. The following options must then be specified in the proper order. Providing no options will backup everything (default).

The current backup options are:

  • config,

  • app,

  • data,

  • db,

  • batm-manage

Example:

backup “data db”

  • only archives your data & database.

restore backupdir

backupdir is required and points to a valid folder containing a backup

e.g. /batm/backup/20230323-151707-0400

Restores a backup. You may (optionally) specify datatypes to avoid overwriting valid data. They must be specified in the proper order. Specifying no options will restore everything in the folder (default).

The current restore options are:

  • config,

  • app,

  • data,

  • db,

  • batm-manage

Examples:

restore backupdir “db”

  • only restores your database

restore backupdir “data db”:

  • restores both your data folder and the database

export terminal serialno1 serialno2

Export terminals from server

  • The compressed file is saved at the current path,

    • e.g. /batm/BT123456.xml.gz

import terminal serialno.xml.gz <organizationName>

Import a terminal backup into the server, assigning it to the optional organizationName.

  • Use a fully qualified path for filename,

    • e.g. /batm/BT123456.xml.gz

  • Enclose organizationName in quotes,

    • e.g. sudo /batm/batm-manage import terminal BT123456.xml.gz “GB Demo”

export identity organizationName

Exports all Identity data, including images.

  • The compressed file is saved at the current path,

    • e.g. /batm/GBDemo_identities.xml.gz

  • Enclose organizationName in quotes:

    • e.g. sudo /batm/batm-manage export identity “GB Demo”

import identity filename.xml.gz <organizationName>

Imports all Identity data, including images, from an export file (see: export identity).

  • Use a fully qualified path for filename:

    • e.g. /batm/GBDemo_identities.xml.gz

  • Enclose organizationName in quotes:

    • e.g. ... import identity filename.xml.gz “GB Demo”

reset-user user

Reset password & 2FA for user

Note the following password rules:

unban-ip ipaddress

Removes any IP login ban.

unban-user username

Removes the specified username from ban list.

fg master | admin

Starts the selected service in the foreground.

  • Service messages are displayed onscreen in real-time.

  • Useful for advanced troubleshooting.

license [newlicense]

Displays the current license, or updates the license key.

show balances BTC | LTC

Prints out any temporary wallets with non-zero balances.

  • Shows any BTC (or LTC) "stuck" on the server.

collect-photos [duration]

Collect photos from all Terminals (main cameras).

  • photos are taken only if the Terminal is idle.

  • “duration” is an integer timeout, e.g “30” would force all pictures to be taken & uploaded within 30 minutes. Longer periods result in greater chance of idle time - allowing the Terminals enough time to complete the requested task.

audit-fingerprints

Analyzes any fingerprint files. Reports point quality, enabling poor quality files to be removed from Identity files.

install-reverse-proxy

Installs the nginx reverse proxy server.

See: NGINX as a Proxy Server

heap-dump master | admin

Dumps the java heap of the master or admin service

  • for development troubleshooting

sanitize all | old

Removes database records containing sensitive information

  • See:

Copyright © 2020-2024 General Bytes USA LLC