jenkins启动关闭脚本
小于 1 分钟
jenkins启动关闭脚本
启动脚本
#!/bin/bash
java -jar /usr/local/jenkins/jenkins.war --httpPort=8080 --enable-future-java &2> jenkins.log
关闭脚本:
#!/bin/bash
ps -ef |grep -v grep | grep jenkins | awk '{print $2}' | xargs kill -s 9 >/dev/null 2>&1
重启脚本:
#!/bin/bash
sh /usr/local/jenkins/stopjk.sh
echo "jenkins关闭成功"
sleep 3;
sh /usr/local/jenkins/startjk.sh
echo "jenkins启动成功"
echo "---------------------------"
echo "jenkins重启成功"