GoAnywhere MFT Linux: Configure as a Service on Systemd
Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
2 posts
Page 1 of 1
The Linux version of GoAnywhere MFT is packaged as a shell script. The installation manual leaves you with a terse instruction:
You can setup GoAnywhere so it starts automatically when the Linux system is booted. Please refer to your operating system manual for more details on setting up auto-start services. You can execute goanywhere.sh from your startup scripts.
You're then left to your own devices. I figured out how to setup a service unit file for automatically starting GoAnywhere MFT 5.4.3 at system startup on a RHEL7 OS. This will certainly work on Centos 7 and Oracle Linux 7 systems, and should work (with minor modifications?) on any distribution using Systemd.
There is probably room for improvement and I'd love to hear any suggestions, but this has worked well for me.
Create your Systemd unit file. (The name is arbitrary and can be anything ending with .service.):
Enable automatic startup:
Daniel
You can setup GoAnywhere so it starts automatically when the Linux system is booted. Please refer to your operating system manual for more details on setting up auto-start services. You can execute goanywhere.sh from your startup scripts.
You're then left to your own devices. I figured out how to setup a service unit file for automatically starting GoAnywhere MFT 5.4.3 at system startup on a RHEL7 OS. This will certainly work on Centos 7 and Oracle Linux 7 systems, and should work (with minor modifications?) on any distribution using Systemd.
There is probably room for improvement and I'd love to hear any suggestions, but this has worked well for me.
Create your Systemd unit file. (The name is arbitrary and can be anything ending with .service.):
Code: Select all
Apply correct permissions:
touch /etc/systemd/system/goanywhere.service
Code: Select all
Edit /etc/systemd/system/goanywhere.service as follows:
chmod 664 /etc/systemd/system/goanywhere.service
Code: Select all
Notify systemd that a new unit file exists by running this:
[Unit]
Description=GoAnywhere Service
After=network.target
[Service]
Type=forking
# Modify user/group according to whichever user you have setup to run GoAnywhere MFT
User=gasvc
Group=gasvc
WorkingDirectory=/usr/local/Linoma_Software/GoAnywhere
# My executable is a shell rather than the actual shell script, goanywhere.sh.
# This is a workaround for the way goanywhere.sh is written, expecting to be run from the installation directory,
# using a relative path. The executable in a systemd unit file has to include an absolute path. I wanted to avoid
# modifying the shell script to make unit file upgrade-friendly.
ExecStart=/bin/sh goanywhere.sh start
ExecStop=/bin/sh goanywhere.sh stop
Restart=on-abort
StandardOutput=null
StandardError=null
TimeoutSec=300
# goanywhere.sh is just starting a Tomcat application; this gives you correct exit status
SuccessExitStatus=143
[Install]
WantedBy=default.target
Code: Select all
(You also need to run this after making subsequent changes to the file.)systemctl daemon-reload
Enable automatic startup:
Code: Select all
Start the service:
systemctl enable goanywhere.service
Code: Select all
Check status:
systemctl start goanywhere.service
Code: Select all
Cheers,systemctl status goanywhere.service
Daniel
2 posts
Page 1 of 1