This program executes any text received by message as a system command and returns the output of the command as a message. Only single commands can be executed directly. No interactive terminal is created.
For more information, see the configuration options (at the end of the program files). Everything else is briefly documented there. After the first start this configuration will be created as default config in the corresponding file.
### Features
- Compatible with all LXMF applications (NomadNet, Sideband, ...)
## Examples of use
###
### General info how the messages are transported
All messages between client<->server are transported as single 1:1 messages in the LXMF/Reticulum network.
Accordingly, encryption takes place between these end points.
If a direct delivery of the message does not work, it is sent to a propagation node. There it is stored temporarily and can be retrieved by the client later.
As these are normal LXMF messages, any LXMF capable application can be used to communicate with the group.
- After the first start edit the configuration file to suit your needs and use-case. The file location is displayed.
- Example minimal configuration (override of the default config `config.cfg`). These are the most relevant settings that need to be adjusted. All other settings are in `config.cfg`
```bash
nano /root/.lxmf_cmd/config.cfg.owr
```
```bash
```
- Start it again. Finished!
```bash
./lxmf_cmd.py
```
### Run as a system service/deamon:
- Create a service file.
```bash
nano /etc/systemd/system/lxmf_cmd.service
```
- Copy and edit the following content to your own needs.
```bash
[Unit]
Description=lxmf_cmd.py Daemon
After=multi-user.target
[Service]
# ExecStartPre=/bin/sleep 10
Type=simple
Restart=always
RestartSec=3
User=root
ExecStart=/root/lxmf_cmd.py
[Install]
WantedBy=multi-user.target
```
- Enable the service.
```bash
systemctl enable lxmf_cmd
```
- Start the service.
```bash
systemctl start lxmf_cmd
```
### Start/Stop service:
```bash
systemctl start lxmf_cmd
systemctl stop lxmf_cmd
```
### Enable/Disable service:
```bash
systemctl enable lxmf_cmd
systemctl disable lxmf_cmd
```
### Run several instances (To copy the same application):
- Run the program with a different configuration path.
```bash
./lxmf_cmd.py -p /root/.lxmf_cmd_2nd
./lxmf_cmd.py -p /root/.lxmf_cmd_3nd
```
- After the first start edit the configuration file to suit your needs and use-case. The file location is displayed.
### First usage:
- With a manual start via the console, the own LXMF address is displayed: