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 638B

12345678910111213141516171819202122
  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 Return the root url of the instance
  7. def root_url():
  8. return Settings.sitename
  9. ##@brief uwsgi startup demo
  10. @LodelHook('lodel2_loader_main')
  11. def uwsgi_fork(hook_name, caller, payload):
  12. if Settings.webui.standalone:
  13. cmd='uwsgi_python3 --http-socket {addr}:{port} --module plugins.webui.run'
  14. cmd = cmd.format(
  15. addr = Settings.webui.listen_address,
  16. port = Settings.webui.listen_port)
  17. exit(os.system(cmd))