SystemD scripts for Automated Startup of TIBCO MFT Platform Server for UNIX

SystemD scripts for Automated Startup of TIBCO MFT Platform Server for UNIX

book

Article ID: KB0076676

calendar_today

Updated On:

Products Versions
TIBCO Managed File Transfer Platform Server for UNIX All

Description

MFTPS can be set to start automatically after a reboot on UNIX machines. A SystemD script can be created to facilitate this. 

Issue/Introduction

Automated startup of TIBCO MFT Platform Server for UNIX after a reboot.

Environment

Tested on Linux RHEL 7.x

Resolution

Note: Absolute paths must be provided for variables in <>.

For TIBCO MFT Platform Server 8:
===============================

Note: For MFTPS for UNIX 7.2, the executables are present in the <mftps> directory and not <mftps>/bin.

Prerequite: The /etc/environment file must have the Environment Variables mentioned in the documentation:

export CFROOT=<mftps>
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:<mftps>/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CFROOT/libs

Note: The PATH variable in the second export statement must include all the variables.
To obtain all the variables in PATH, run 'echo $PATH' and copy the output and add <mftps>/bin at the end.

1. Create a Unit file in /etc/systemd/system/ title mftps.service

Contents of the Unit file:

[Unit]
Description=MFTPS 8.0 Service


[Service]

Type=oneshot
ExecStart=<mftps>/bin/cfstart
RemainAfterExit=true
StandardOutput=journal
User=root
ExecStop=<mftps>/bin/cfstop
Environment= CFROOT=/mftps 
Environment= PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/mftps/bin
Environment= LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CFROOT/libs


[Install]
WantedBy=multi-user.target

2. Save the Unit file.

3. Run 'systemctl enable mftps.service'. // enables the service to start automatically after a reboot.

4. Run 'systemctl start mftps.service'. // starts the service 

5. To check if the process is started: 'systemctl status mftps.service'. 

6. To stop the service: 'systemctl stop mftps.service'.