centos/ubuntu jenkins.war 自启动脚本,Linux启动停止jar包的运行案例
jenkins 作为 linux的启动项
1 | ! /bin/sh |
保存为jenkins目录下 jenkins.sh
JENKINS_ROOT为 jenkins目录
1 | !/bin/bash |
保存为:start_jenkins.sh
1.centos
1 | ln -s /home/lanmps/jenkins/jenkins.sh /etc/init.d/jenkins |
启动方式1
/etc/init.d/jenkins start
2.ubuntu
1 | sudo ln -s /home/lanmps/jenkins/jenkins.sh /etc/init.d/jenkins |
启动方式1
/etc/init.d/jenkins start