How To: Log the Stoppage of the Ephesoft Transact Service in Windows and Linux

Applies to: Ephesoft 4.x versions

 

Users of Ephesoft may want to track the stoppage of the Ephesoft Transact service in the logs for compliance, auditing or security purposes. For Windows users, this simply entails setting the Ephesoft logging level to INFO level to see the output in the dcma.all log (found in \Ephesoft\Application\logs)

For Linux users, we also need to make sure the logging is set to INFO level, however, we also need to add an extra step. To see the output in the Catalina.out log on Linux systems, you must also navigate to the shutdown-helper.sh file (found at /opt/Ephesoft/Java/bin/). Open the file in vi (or the editor of your choice) and add the following line to the file (added in bold):

 

#!/bin/sh

ephesoft_server_process_id=$(ps -eaf|grep tomcat|grep Ephesoft|awk ‘{print $2}’)

echo “========== Stopping Ephesoft server ========== Test message redirected to Catalina.out” >> /opt/Ephesoft/JavaAppServer/logs/catalina.out

if [ “$ephesoft_server_process_id” != ” ]

then

                echo “========== Stopping Ephesoft server ==========”

                kill -9 $ephesoft_server_process_id

                if [ $? != 0 ]

                then

               echo “Error occurred while stopping Ephesoft server.”

                                exit 1

        fi

                pkill soffice

                echo “========== Ephesoft server stopped successfully. ==========”

else

                echo “Ephesoft server is already stopped.”

fi

 

Then write, save and quit the file. Now when stopping the Ephesoft Transact service in Linux, you will see the following added to the log file when running the tail command:

root@ubuntu:/home/ephesoft# cd /opt/Ephesoft/JavaAppServer/logs
root@ubuntu:/opt/Ephesoft/JavaAppServer/logs# tail catalina.out

FactoryBean#4_Worker-4] [com.ephesoft.dcma.da.retry.aspect.DeadlockRetryAspect] – Deadlock Aspect returning result
2018-06-30 10:59:11,025 [DEBUG] [org.springframework.scheduling.quartz.SchedulerFactoryBean#4_Worker-4] [com.ephesoft.dcma.workflows.service.impl.PickUpServiceImpl] – PickUp Service is running on a current server
========== Stopping Ephesoft server ==========

root@ubuntu:/opt/Ephesoft/JavaAppServer/logs#