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成功"

【Jenkins】一键部署启动Frps_linux