将脚本放在/etc/init.d目录下时: 启动脚本:service reset start 停止脚本:service reset stop 重启脚本:service reset restart 重启uwsgi脚本(reset): #!/bin/bash #app reset #author: ouyang #date: 2020-9-23 #let jar run nohup java -jar /home/nisec/ace-access.jar >/dev/null 2>&1 & #enter virtual environment source /home/flask/venv/bin/activate cd /home/flask rm -rf uwsgi.pid #uwsgi run uwsgi --ini venv/uwsgi.ini #cron nohup /home/flask/xnthread.py >/dev/null 2>&1 &
原文:https://www.cnblogs.com/oyaisusu/p/13817096.html