ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Configure Harvest to Auto Restart

book

Article ID: 132556

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

How can I configure the SCM Broker on my Linux server to automatically restart when the server is rebooted?

On the Linux/Unix platforms, Harvest does not, on its own install itself as a service that automatically restarts when the machine reboots. This happens on the Windows side, but not on Linux or Unix. Instead, this is done manually after installing the SCM Broker.

Environment

CA Harvest SCM on Redhat Linux 5.x and 6.x

Resolution

Here is a suggested procedure for configuring Harvest to automatically restart when the server is rebooted:

Setup for auto start (redhat 5x and 6x):

Create a file called "/etc/init.d/cascm" as the root user, containing the following.

#!/bin/sh
# chkconfig: 345 99 10
# description: CA SCM auto start-stop script.
#
# Set SCM_OWNER to the user id of the owner of the 
# Oracle database software.

SCM_OWNER=cascm

case "$1" in
    'start')
        # Start the CA SCM broker
        su $SCM_OWNER -c "/home/cascm/scripts/startup.sh >> /home/cascm/scripts/startup_shutdown.log 2>&1" &
        ;;
    'stop')
        # Stop the CA SCM broker
        su $SCM_OWNER -c "/home/cascm/scripts/shutdown.sh >> /home/cascm/scripts/startup_shutdown.log 2>&1"
        ;;
esac

Use the chmod command to set the privileges to 750.

chmod 750 /etc/init.d/cascm

Associate the "cascm" service with the appropriate run levels and set it to auto-start using the following command.

chkconfig --add cascm

Next, we must create the "startup.sh" and "shutdown.sh" scripts in the "/home/cascm/scripts". First create the directory.

mkdir -p /home/cascm/scripts
chown -R cascm:cascm /home/cascm/scripts

The "/home/cascm/scripts/startup.sh" script should contain the following commands.

#!/bin/bash
/opt/CA/scm/bin/bkrd
ps -ef | grep scm

The "/home/cascm/scripts/shutdown.sh" script is similar.

#!/bin/sh
. /opt/CA/pec/bin/rtinit.sh
/opt/CA/pec/bin/i86_linux24/rtserver.x -stop_all
ps -ef | grep scm

Make sure the permissions and ownership of the files is correct.

chmod u+x /home/cascm/scripts/startup.sh /home/cascm/scripts/shutdown.sh
chown cascm:cascm /home/cascm/scripts/startup.sh /home/cascm/scripts/shutdown.sh

The scm broker will now start and stop automatically with the machine. You can test them using the following command as the "root" user.

# service cascm start
# service cascm stop