Files
MemShellParty/integration-test/script/weblogic_pid.sh
T

12 lines
242 B
Bash
Executable File

#!/bin/bash
pid=""
if command -v ps &> /dev/null; then
pid=$(ps -ef | grep weblogic | grep -v grep | awk '{print $2}')
fi
if [ -z "$pid" ]; then
pid=$(jps 2>/dev/null | grep " Server" | awk '{print $1}')
fi
echo "$pid" | tr -d '\n'