Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
58 lines
736 B
Bash
58 lines
736 B
Bash
|
|
#!/bin/bash
|
|
|
|
pkill -9 -f "main.py" 2>/dev/null
|
|
|
|
pkill -9 -f "rub.py" 2>/dev/null
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
# Force unlock via Python
|
|
|
|
python3 -c "
|
|
|
|
import sqlite3, os
|
|
|
|
db = 'tel2rub.session'
|
|
|
|
if os.path.exists(db):
|
|
|
|
conn = sqlite3.connect(db, timeout=1)
|
|
|
|
conn.execute('PRAGMA journal_mode=DELETE')
|
|
|
|
conn.commit()
|
|
|
|
conn.close()
|
|
|
|
" 2>/dev/null
|
|
|
|
|
|
|
|
# Break the lock by moving the file to a new inode
|
|
|
|
if [ -f "tel2rub.session" ]; then
|
|
|
|
cp tel2rub.session tel2rub.session.fixed
|
|
|
|
rm -f tel2rub.session
|
|
|
|
mv tel2rub.session.fixed tel2rub.session
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -f tel2rub.session-journal tel2rub.session-wal tel2rub.session-shm
|
|
|
|
|
|
|
|
nohup /root/fuck-irgc/Tele2Rub/venv/bin/python3 -u main.py > out.log 2>&1 &
|
|
|
|
sleep 3
|
|
|
|
tail -f out.log
|
|
|