mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 00:19:15 +00:00
Prefer python3 for web UI
This commit is contained in:
parent
982598b94b
commit
38ee8b2ce6
|
@ -3,5 +3,14 @@
|
|||
if [ -f /home/bitcoin/.mynode/.www_use_python3 ]; then
|
||||
exec /usr/local/bin/python3 /var/www/mynode/mynode.py
|
||||
else
|
||||
exec /usr/bin/python2.7 /var/www/mynode/mynode.py
|
||||
# If not forcing python3, use prefer python3 unless in restart cycle
|
||||
count=$(journalctl -b -u www.service | grep -c "Started myNode Web Server")
|
||||
modcount=$(($count % 5))
|
||||
if [ "$modcount" -eq 4 ]; then
|
||||
echo "RESTART COUNT: $modcount (PYTHON2)"
|
||||
exec /usr/bin/python2.7 /var/www/mynode/mynode.py
|
||||
else
|
||||
echo "RESTART COUNT: $modcount (PYTHON3)"
|
||||
exec /usr/local/bin/python3 /var/www/mynode/mynode.py
|
||||
fi
|
||||
fi
|
Loading…
Reference in New Issue
Block a user