#!/bin/bash

# Copyright (c) Verax Systems.  All Rights Reserved.
#
# Script used to kill Verax SNMP Simulator service (for Linux & UNIX)
# Description:
#     This script identifies PIDs of SNMP Simulator service processes, then kills the processes.
#     Finally, vlan_down script is being invoked to down all virtual interfaces.
# Parameters:
#     $1 - Command line parameters used to invoke Simulator process used to identify the exact instance.
#  
# NOTE: This script is being invoked internally by Verax SNMP Simulator and cannot be invoked manually.
for i in $( ps -ef | grep "snmp-simulator-server.jar$1" | grep -v grep | awk '{ print $2 }'); do
	echo pid: $i
	kill $i
done
