autostartbot
This commit is contained in:
parent
94f24ae92f
commit
7b2e1957e3
15
autoStartBot.sh
Executable file
15
autoStartBot.sh
Executable file
@ -0,0 +1,15 @@
|
||||
touch AUTOLOG
|
||||
pwd > AUTOLOG
|
||||
date >> AUTOLOG
|
||||
whoami >> AUTOLOG
|
||||
np=`ps -aux | grep dialoggptBot | wc -l`
|
||||
echo $np >> AUTOLOG
|
||||
if [[ "$np" != "2" ]]
|
||||
then
|
||||
echo "Restarting chatbot..."
|
||||
pkill -9 -f dialoggptBot
|
||||
sleep 15s
|
||||
nohup /home/lawrence/anaconda3/bin/python /home/lawrence/chatbot/dialoggptBot.py > /dev/null 2>&1
|
||||
echo "Done"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user