No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.py 546B

1234567891011121314151617
  1. #-*- coding: utf-8 -*-
  2. import os, os.path
  3. from lodel.plugin import LodelHook
  4. from lodel.settings import Settings
  5. PLUGIN_PATH = os.path.dirname(__file__)
  6. ##@brief uwsgi startup demo
  7. @LodelHook('lodel2_loader_main')
  8. def uwsgi_fork(hook_name, caller, payload):
  9. if Settings.webui.standalone:
  10. cmd='uwsgi_python3 --http-socket {addr}:{port} --module plugins.webui.run'
  11. cmd = cmd.format(
  12. addr = Settings.webui.listen_address,
  13. port = Settings.webui.listen_port)
  14. exit(os.system(cmd))