How to Start and Stop Services Automatically

All server components are installed as services and can be configured to start during installation.

If you are running on Linux platforms, follow these steps to set the session server to start automatically when your system first boots up.

Create a file called zfe containing the following and using your installation directory:

#!/bin/sh
#
#This script manages the service needed to run the session server
#chkconfig:235 19 08
#description:Manage the Reflection ZFE session server 

###BEGIN INIT INFO
# Provides:          zfe
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Description:       Start the Reflection ZFE Session Server
### END INIT INFO

INSTALL_DIR=<enter installation directory>
BIN_DIR=$INSTALL_DIR/sessionserver/bin
case "$1" in
start)
echo "Starting Reflection ZFE Session Server"
$BIN_DIR/server start

RETVAL=0
;;
stop)
echo "Stopping Reflection ZFE Session Server"
$BIN_DIR/server stop

RETVAL=0
;;
status) echo "Current Reflection ZFE Session Server status"
$BIN_DIR/server status

RETVAL=0
;;
restart) echo "Restart Reflection ZFE Session Server"
$BIN_DIR/server restart

RETVAL=0
;;
*)
echo "Usage: $0 (start|stop|status|restart)"

RETVAL=1
;;
esac
exit $RETVAL

Then complete the relevant steps.

Platform

Follow these steps

Linux

  1. Copy the file to the /etc/init.d directory.

  2. Set the file permission. Run chmod using the value 755. For example, chmod 755 zfe

  3. Run chkconfig to add the initialization script. For example, /sbin/chkconfig --add zfe