Server Configuration

From Bondix Wiki
Revision as of 16:25, 14 October 2022 by Red (talk | contribs)

Server Commands

add-apikey

Adds an authentication key to use with the HTTP API.

Parameters
key A secret string used to authenticate an API request.
{
   "target": "server", 
   "action": "add-apikey",
   "key": "a-secret-key"
 }

add-environment

Adds an environment. Deprecated, you can directly create environments in the web interface instead.

Parameters
key A secret string used to authenticate an API request.
{
   "target": "server", 
   "action": "add-apikey",
   "key": "a-secret-key"
 }

add-http

Adds an unencrypted http listener for web interface access.

Parameters
key A secret string used to authenticate an API request.
{
   "target": "server", 
   "action": "add-apikey",
   "key": "a-secret-key"
 }

add-https

Adds an authentication key to use with the HTTP API.

Parameters
key A secret string used to authenticate an API request.
{
   "target": "server", 
   "action": "add-apikey",
   "key": "a-secret-key"
 }

add-user

Adds an user/password pair that can be used to log into the server's web interface.

Parameters
user The username password and password
{
   "target": "server", 
   "action": "add-user",
   "user": "admin",
   "password": "bad password"
 }

set-fallback-watchdog

Parameters
user The username
{
   "target": "server", 
   "action": ""
 }

slow-shutdown

Parameters
user The username
{
   "target": "server", 
   "action": ""
 }

set-password-authentication

Parameters
user The username
{
   "target": "server", 
   "action": ""
 }

set-web-login

Parameters
user The username
{
   "target": "server", 
   "action": ""
 }

enable-demo

Parameters
user The username
{
   "target": "server", 
   "action": ""
 }


System Commands

shutdown

Shuts down the client and terminates.

{
   "target": "system", 
   "action": "shutdown"
 }

set-log

Enables logging to file or changes output file.

Parameters
file The filename that the log should be written to. Required.
fileMode can be append or overwrite. Required.
{
   "target": "system", 
   "action": "set-log", 
   "file": "/var/log/saneclient.log", 
   "fileMode": "append"
 }

set-script-path

Changes the directory that points towards the client scripts. (/opt/bondix/client/scripts by default)

Parameters
path Path to the new bondix script directory.
{
   "target": "system", 
   "action": "set-script-path", 
   "path": "/etc/bondix/scripts"
 }

set-webinterface

Enables the integrated webserver & debug webinterface.

Parameters
host IP that the service should listen on. Required.
port TCP Port that the service should listen on. Required.
allowConfig En- or disables web configuration. Not required, enabled by default.
allowMonitor En- or disables web monitor. Not required, enabled by default.
configApiKey The password required to access configuration & monitor. Not required, "123456" by default.
webroot Web root directory. Points to the "www" subdirectory in installation directory. Not required, changing not advised.
{
   "target": "system", 
   "action": "set-webinterface", 
   "host": "0.0.0.0", 
   "port": "80",
   "allowConfig": false, 
   "allowMonitor": true, 
   "configApiKey": "123456", 
   "webroot": "/tmp/"
 }