A template module for NethServer 8 that provides checkcle functionality.
- Installation
- Configuration
- Usage
- Uninstallation
- Smarthost Settings
- Debugging
- Testing
- UI Translation
- License
Instantiate the module with the following command:
add-module ghcr.io/geniusdynamics/checkcle:latest 1
The output will return the instance name, for example:
{
"module_id": "checkcle1",
"image_name": "checkcle",
"image_url": "ghcr.io/geniusdynamics/checkcle:latest"
}
Assuming the instance is named checkcle1
, launch configure-module
with the following parameters:
host
: Fully qualified domain name for the applicationhttp2https
: Enable or disable HTTP to HTTPS redirection (true/false)lets_encrypt
: Enable or disable Let's Encrypt certificate (true/false)
Example configuration:
api-cli run configure-module --agent module/checkcle1 --data - <<EOF
{
"host": "checkcle.domain.com",
"http2https": true,
"lets_encrypt": false
}
EOF
This command will:
- Start and configure the checkcle instance
- Configure a virtual host for Traefik to access the instance
Retrieve the current configuration:
api-cli run get-configuration --agent module/checkcle1
To update the module to a new version or image, use the following command:
api-cli run update-module --data '{
"module_url": "ghcr.io/geniusdynamics/checkcle:latest",
"instances": ["checkcle1"],
"force": true
}'
This will update the specified instances to the new module URL.
To uninstall the instance:
remove-module --no-preserve checkcle1
Some configuration settings, like the smarthost setup, are discovered automatically by checking Redis keys. The module ensures it stays up-to-date with the centralized smarthost setup.
- The
bin/discover-smarthost
command refreshes thestate/smarthost.env
file with fresh values from Redis on startup. - If smarthost settings change while the module is running, the event handler
events/smarthost-changed/10reload_services
restarts the main service. - Refer to
systemd/user/checkcle.service
for more details.
This is an example implementation and can be customized or removed as needed.
Use these CLI commands for debugging:
Check environment variables set by the agent:
runagent -m checkcle1 env
Switch to the runagent environment for testing:
runagent -m checkcle1
The PATH will be updated to:
/home/checkcle1/.config/bin:/usr/local/agent/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/
Translations are managed with Weblate.
To set up the translation process:
- Add the GitHub Weblate app to your repository
- Add your repository to hosted.weblate.org or ask a NethServer developer to add it to the NS8 Weblate project
This project is licensed under the terms specified in the LICENSE file.