diff --git a/requirements.txt b/requirements.txt index d04fe1935e..bfe497e602 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,6 +38,7 @@ PyMySQL>=1.0.2 whitenoise==5.3.0 pyotp pytz +supervisor pyTelegramBotAPI telebot -pyyaml \ No newline at end of file +pyyaml diff --git a/scripts/old/update.sh b/scripts/old/update.sh index 079aa59249..fb9527f913 100644 --- a/scripts/old/update.sh +++ b/scripts/old/update.sh @@ -77,19 +77,24 @@ fi if [ "$LOCAL_ADDR" != "common" ];then # curl --insecure -sSLo /tmp/master.zip https://code.midoks.icu/midoks/mdserver-web/archive/master.zip - wget --no-check-certificate -O /tmp/master.zip github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip + wget --no-check-certificate -O /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip cd /tmp && unzip /tmp/master.zip - $CP_CMD -rf /tmp/mdserver-web/* /www/server/mdserver-web + $CP_CMD -rf /tmp/mdserver-web-${VERSION}/* /www/server/mdserver-web rm -rf /tmp/master.zip - rm -rf /tmp/mdserver-web + rm -rf /tmp/mdserver-web-${VERSION} + + pip install -r /www/server/mdserver-web/requirements.txt else - curl --insecure -sSLo /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master + # curl --insecure -sSLo /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/0.17.3.zip + curl --insecure -sSLo /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip cd /tmp && unzip /tmp/master.zip - $CP_CMD -rf /tmp/mdserver-web-master/* /www/server/mdserver-web + $CP_CMD -rf /tmp/mdserver-web-${VERSION}/* /www/server/mdserver-web rm -rf /tmp/master.zip - rm -rf /tmp/mdserver-web-master + rm -rf /tmp/mdserver-web-${VERSION} + + pip install -r /www/server/mdserver-web/requirements.txt fi diff --git a/web/thisdb/user.py b/web/thisdb/user.py index 56bd243283..4229721900 100644 --- a/web/thisdb/user.py +++ b/web/thisdb/user.py @@ -102,7 +102,7 @@ def setUserByRoot(name = None,password = None) -> bool: ''' data = {} if name is not None: - mw.M('users').where('id=?', (1,)).setField('username', name) + mw.M('users').where('id=?', (1,)).setField('name', name) if password is not None: pwd = mw.md5(password)