diff --git a/admin/dashboard.py b/admin/dashboard.py index 875e9d4..bfa39c0 100644 --- a/admin/dashboard.py +++ b/admin/dashboard.py @@ -333,7 +333,11 @@ def pastafari2_getprogress(): 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}) @@ -956,7 +960,7 @@ def pastafari2_add_user_task(): 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'] if num_user==0: diff --git a/scripts/system/install_python.sh b/scripts/system/install_python.sh index aa94fbe..6af2cd8 100644 --- a/scripts/system/install_python.sh +++ b/scripts/system/install_python.sh @@ -8,7 +8,9 @@ sleep 1 # 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