...
# vi /etc/mft/web_transfer_client/config.toml
Panel |
---|
[settings]
# Network interface, default "0.0.0.0"
inet = "0.0.0.0"
# Port, default "5050"
port = "5050"
# Enable recover on panic, default true, should be true for production environment
recover = true
# Enable Cross-Origin Resource Sharing (CORS), should be true for production environment
cors = true
# Enable Request Track ID, default true
tracker = true
# Enable Request Logguer, default true
logger = true
# Working directory
workdir = /home/mft
[secrets]
# URL of the Web Client Authentication server API
endpoint = "http://<LOCAL-AUTH-ADRESS>:<LOCAL-AUTH-PORT>"
# API Key to authenticate to the Web Client Authentication server
apikey = "<API_KEY>"
|
The placeholders LOCAL-AUTH-ADRESS, LOCAL-AUTH-PORT and API _KEY must be set to the values from the local authentication server that is configured on the UDMG Admin UI, see Tutorial.
Install the binary under /usr/local/bin:
# install -m 755 mft_web_upload /usr/local/bin
Setup the Systemd Services
UDMG Web Transfer Client
Create a new service definition:
# vi /etc/systemd/system/mft_web_transfer_client.service
Panel |
---|
[Unit]
Description=MFT Web Transfer Client
[Service]
Type=simple
User=mft
Group=mft
WorkingDirectory=/home/mft
Environment=MFT_WEB_UPLOAD=/etc/mft/web_transfer_client/config.toml
ExecStart=/bin/sh -c 'exec /usr/local/bin/mft_web_upload'
Restart=on-failure
[Install]
WantedBy=multi-user.target
|
Panel |
---|
# systemctl enable mft_web_transfer_client.service
Created symlink /etc/systemd/system/multi-user.target.wants/mft_web_transfer_client.service → /etc/systemd/system/mft_web_transfer_client.service.
|
- Start the service and check the status:
# systemctl start mft_web_transfer_client
# systemctl status mft_web_transfer_client