32 lines
551 B
Bash
32 lines
551 B
Bash
#!/bin/bash
|
|
|
|
echo "程序开始运行!"
|
|
|
|
if ! pgrep -f "run.py" > /dev/null
|
|
then
|
|
python3 run.py
|
|
fi
|
|
|
|
echo *********start python_scripts success*******
|
|
|
|
sleep 30
|
|
|
|
|
|
|
|
# pip3 install -r requirements.txt
|
|
|
|
# sudo yum install inotify-tools
|
|
# sudo apt install inotify-tools
|
|
|
|
# python3 ./run.py
|
|
|
|
# sudo cp server_login_detection.service /etc/systemd/system/
|
|
# sudo systemctl daemon-reload
|
|
|
|
# sudo systemctl start server_login_detection.service
|
|
|
|
# sudo systemctl status server_login_detection.service
|
|
|
|
# sudo systemctl stop server_login_detection.service
|
|
|