Files
bot-on-anything/scripts/start.sh

19 lines
509 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
#后台运行bot-on-anaything执行脚本
cd `dirname $0`/..
export BASE_DIR=`pwd`
echo $BASE_DIR
# check the nohup.out log output file
if [ ! -f "${BASE_DIR}/logs/log_info.log" ]; then
mkdir "${BASE_DIR}/logs"
touch "${BASE_DIR}/logs/log_info.log"
echo "${BASE_DIR}/logs/log_info.log"
fi
nohup python3 "${BASE_DIR}/app.py" >> ${BASE_DIR}/logs/log_info.log & tail -f "${BASE_DIR}/logs/log_info.log"
echo "bot-on-anaything is startingyou can check the ${BASE_DIR}/logs/log_info.log"