VERIFIED SOLUTION i
X

Manage EngageOne Vault Services in LINUX

UPDATED: August 20, 2018


Once the EngageOne Vault has been installed and configured  (Licence file, profiles, etc.), the EngageOne Vault services can be managed as follows:
  • To start all EngageOne Vault services (indexerd, e2serverd and e2loaderd) together
/etc/init.d/vault start
  • ​To stop all EngageOne Vault services (indexerd, e2serverd and e2loaderd) together
/etc/init.d/vault stop      

Refer following script to manage the EngageOne Vault services(indexerd, e2serverd and e2loaderd) individually which needs to be saved in a file with the extension '.sh' and should have full permission.

For example - If the script file name is 'vaultservice.sh' then command should be run as - 
./vaultservice.sh e2loaderd start     (To start e2loaderd service)
#!/bin/sh
#
# (C) Copyright 2012 Pitney Bowes Software Inc. All rights reserved.
#
# Vault run control script for Linux
#


VAULT_ROOT="/opt/PBBI CCM/Vault"
VAULT_PIDS=/var/opt/vault/run

start_process()
{
	if [ -f "$3" ]; then
		echo "pid file $3 still exists - stop the Vault servers first or delete the stale PID file"
        elif [ -f "$2/log/$1.pid" ]; then
                echo "pid file $2/log/$1.pid still exists - stop the Vault servers first or delete the stale PID file"
	elif [ ! -x "$2/$1" ]; then
		echo "$2/$1 is missing or not executable"
	else

		LD_LIBRARY_PATH=$VAULT_ROOT/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH

		echo "starting $1"
		cd "$2" && "$2/$1"
	fi

	sleep 1
}

stop_process()
{
        if [ -f "$3" ]; then
		echo "stopping $1"
                kill -TERM `/bin/cat "$3"`
		sleep 1
        fi

        if [ -f "$2/log/$1.pid" ]; then
		echo "stopping $1"
		kill -TERM `/bin/cat "$2/log/$1.pid"`
		sleep 1
        fi
}

start_one()
{
        case "$1" in

        indexerd | e2serverd | e2loaderd)
                start_process $1 "$VAULT_ROOT/server" "$VAULT_PIDS/$1.pid"
                ;;
        e2renderd)
                start_process $1 "$VAULT_ROOT/render" "$VAULT_PIDS/$1.pid"
                ;;
        *)
                echo "unknown process $1"
                ;;
        esac
}

stop_one()
{
        case "$1" in

        indexerd | e2serverd | e2loaderd)
                stop_process $1 "$VAULT_ROOT/server" "$VAULT_PIDS/$1.pid"
                ;;
        e2renderd)
		stop_process $1 "$VAULT_ROOT/render" "$VAULT_PIDS/$1.pid" 
                ;;
        *)
                echo "unknown process $1"
                ;;
        esac
}

start_all()
{
        start_one indexerd
        start_one e2serverd
        start_one e2loaderd
        start_one e2renderd
}

stop_all()
{
        stop_one e2renderd
        stop_one e2loaderd
        stop_one e2serverd
        stop_one indexerd
}

usage()
{
	echo "Usage:"
	echo "    $0 { start | stop }"
	echo "    $0 { start | stop } { e2serverd | e2loaderd | e2renderd | indexerd }"
}


case "$1" in

start)
	if [ -z "$2" ]; then
		start_all
	else
		start_one $2
	fi

	;;

stop)
        if [ -z "$2" ]; then
                stop_all
	else
		stop_one $2
        fi

        ;;

*)
	usage        
        exit 1

        ;;

esac
exit 0

Downloads

  • No Downloads