centos7.6 jumpserver 堡垒机 重启启动顺序
cd /sdata/usr/local python3.6 -m venv py3 source /sdata/usr/local/py3/bin/activate cd /sdata/usr/local/jumpserver ./jms start -d docker start jms_koko docker start jms_guacamole systemctl restart nginx
jumpserver 堡垒机 重启启动顺序
重启脚本
#!/bin/bash systemctl restart jms sleep 1 ps -e|grep koko|awk '{print "kill -9 "$1}'|sh sleep 1 /etc/init.d/koko start sleep 1 docker restart jms_guacamole sleep 1 systemctl restart nginx
vim /etc/init.d/koko
#!/bin/bash # description: koko Start Stop Restart # processname: koko # chkconfig: 234 20 80 KOKO_HOME=/sdata/usr/local/kokodir case $1 in start) cd $KOKO_HOME ./koko -d cd ;; stop) ps -e|grep koko|awk '{print "kill -9 "$1}'|sh ;; restart) $0 stop sleep 1 $0 start ;; *) echo 'please use : koko {start | stop | restart}' ;; esac exit 0