[Jenkins] a key to start the deployment Frps

echo "停止frps"

#sudo -i echo 'linux密码'

pid=`ps -ef | grep frps | grep -v grep | awk '{print $2}'`
if [ -n "$pid" ]
then
  echo 'linux密码'|sudo -S kill -9 $pid
fi
echo "启动frps"

cd /usr/local/frp_0.32.0_linux_amd64

echo 'linux密码'|sudo -S nohup ./frps -c ./frps.ini >/dev/null 2>&1 &

echo "启动frps成功"

Published 53 original articles · won praise 0 · Views 840

Guess you like

Origin blog.csdn.net/G971005287W/article/details/105068146