feat: add app update checks and standalone release publishing panel
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Run interactively on your server; do not send its output to chat."""
|
||||
import getpass
|
||||
import secrets
|
||||
from update_service import hash_password
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
password = getpass.getpass('设置更新后台密码(至少12位): ')
|
||||
if password != getpass.getpass('再次输入: '):
|
||||
raise SystemExit('两次输入不一致,未生成配置。')
|
||||
try:
|
||||
password_hash = hash_password(password)
|
||||
except ValueError as error:
|
||||
raise SystemExit(str(error)) from None
|
||||
print('仅在服务器填写下面两行到.env,保留单引号,不要发到聊天:')
|
||||
print(f"ADMIN_PASSWORD_HASH='{password_hash}'")
|
||||
print(f"SESSION_SECRET='{secrets.token_hex(32)}'")
|
||||
Reference in New Issue
Block a user