This is sh-based Dwarfguard agent for universal GNU/Linux device.

Maturity status: basic functionality + systemd/initd integration.

Installation:

1) as root, run ./dwarfg_agent.sh
2) if previous installation of the agent is found (/opt/adwarfg), installation will fail as you need to remove the previous version first (see Uninstallation below).
3) agent is deployed in /opt/adwarfg, systemd/initd integration is attempted if systemd/initd is detected.
4) Agent is started afterwards

Uninstallation:

1) as root, run /opt/adwarfg/uninstall.sh

Notes:

You can found some information and log files inside /opt/adwarfg directory. Please note that messing with any of the files content may render the agent non-functional.

List of some of the files created upon deployment:

/opt/adwarfg/server.ini ... contains server URL (if not present, default address from script is used)
/opt/adwarfg/server.pem ... contains server pem certificate if server uses certificates that cannot be authenticated by using public authorities (e.g. self-signed certificate)
/opt/adwarfg/settings.ini ... contains all other settings. Refer below.
/opt/adwarfg/global_log.txt ... contains global log of the agent
/opt/adwarfg/uninstall.sh ... contains uninstall script (customized upon deployment)
/opt/adwarfg/<PID> ... working directory for agent with PID <PID>, most importantly containing its log (the non-global messages)

Selected keys from settings.ini:

DEVICE_ID ... ID of the device in Dwarfguard server it is registered with

Selected keys from settings.ini that you can mess with (though no one guarantees anything if you do it):

[DLS]LEVEL ... numeric settings determining which loglevel is ok to go to debug, log or syslog. loglevel 1 is pure debug, 6 is fatal
INTERVAL_* ... number of seconds between data pushes. Warning: shortening this too much will not only increase server load, but could cause errors with data processing. The recommended minimum is 120 seconds. The tested minimum with local Dwarfguard server is 4 seconds (NOT RECOMMENDED!). The default is 260 and it is strongly recommended to stick with that.
SMALLCYCLES ... number of regular cycles until bigcycle is executed
SECURITY ... 2, 1 or 0. 2 is the default, 1 allows for semi-secure way of server certificate update, 0 disables server certificate checking. Note that even with 0, HTTPS protocol is used.
