Fix in install_python script for use bash

This commit is contained in:
Antonio de la Rosa 2025-11-16 23:33:40 +01:00
parent 60095aa17c
commit e36e055a13
2 changed files with 9 additions and 3 deletions

View file

@ -333,7 +333,11 @@ def pastafari2_getprogress():
if arr_task: if arr_task:
logtask.set_limit([position, 5]) c_list=logtask.set_conditions('WHERE task_id=%s', [task_id]).select_count()
final_pos=c_list-position
logtask.set_limit([position, final_pos])
logtask.set_order({'id': 0}) logtask.set_order({'id': 0})
@ -956,7 +960,7 @@ def pastafari2_add_user_task():
if not error: if not error:
with db.query('select count(*) as num_user from systemuser WHERE username=%s', [post['username']]) as cursor: with db.query('select count(*) as num_user from systemuser WHERE username=%s AND server_id=%s', [post['username'], server_id]) as cursor:
num_user=cursor.fetchone()['num_user'] num_user=cursor.fetchone()['num_user']
if num_user==0: if num_user==0:

View file

@ -8,7 +8,9 @@ sleep 1
# Get distro version using lsb_release # Get distro version using lsb_release
DISTRO=`( lsb_release -ds || cat /etc/*release || uname -om ) 2>/dev/null | head -n1` DISTRO=`( lsb_release -ds || cat /etc/os-release || uname -om ) 2>/dev/null | head -n1`
echo "$DISTRO detected"
if [[ $DISTRO =~ ^Debian ]] || [[ $DISTRO =~ ^Ubuntu ]]; then if [[ $DISTRO =~ ^Debian ]] || [[ $DISTRO =~ ^Ubuntu ]]; then