添加了启动与停止脚本

This commit is contained in:
2023-12-10 16:43:45 +08:00
parent e00a704a56
commit b25e598f39
2 changed files with 30 additions and 0 deletions

12
start.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# 定义要运行的Python文件
PYTHON_APP="main.py"
# 使用nohup命令启动Python程序并将其输出重定向到日志文件
nohup python3 $PYTHON_APP > output.log 2>&1 &
# 打印消息,通知用户程序已启动
echo "Python application started!"
# 可以添加任何其他需要的启动逻辑