You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
397 B
14 lines
397 B
1 month ago
|
#!/bin/bash
|
||
|
PID=`ps -ef | grep echo-sshd-server.jar | grep -v grep | awk '{print $2}'`
|
||
|
if [ -z "$PID" ]
|
||
|
then
|
||
|
sudo nohup /opt/jdk-17/bin/java -jar echo-sshd-server.jar conf > logs/exec.log 2>&1 &
|
||
|
sleep 1
|
||
|
PID=`ps -ef | grep echo-sshd-server.jar | grep -v grep | awk '{print $2}'`
|
||
|
echo "started echo-sshd-server.jar pid: $PID"
|
||
|
else
|
||
|
echo "already exist echo-sshd-server.jar pid: $PID"
|
||
|
fi
|
||
|
|
||
|
|