mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Init app_shell
This commit is contained in:
parent
06826b4fc0
commit
3bb32dc1e4
2 changed files with 26 additions and 0 deletions
|
@ -954,6 +954,12 @@ app:
|
||||||
help: Delete the key
|
help: Delete the key
|
||||||
action: store_true
|
action: store_true
|
||||||
|
|
||||||
|
### app_shell()
|
||||||
|
shell:
|
||||||
|
action_help: Open an interactive shell with the app environment already loaded
|
||||||
|
arguments:
|
||||||
|
app:
|
||||||
|
help: App ID
|
||||||
|
|
||||||
### app_register_url()
|
### app_register_url()
|
||||||
register-url:
|
register-url:
|
||||||
|
|
20
src/app.py
20
src/app.py
|
@ -1645,6 +1645,26 @@ def app_setting(app, key, value=None, delete=False):
|
||||||
_set_app_settings(app, app_settings)
|
_set_app_settings(app, app_settings)
|
||||||
|
|
||||||
|
|
||||||
|
def app_shell(app):
|
||||||
|
"""
|
||||||
|
Open an interactive shell with the app environment already loaded
|
||||||
|
|
||||||
|
Keyword argument:
|
||||||
|
app -- App ID
|
||||||
|
|
||||||
|
"""
|
||||||
|
app_settings = _get_app_settings(app) or {}
|
||||||
|
|
||||||
|
#TODO init a env_dict
|
||||||
|
#TODO load the app's environment, parsed from:
|
||||||
|
#TODO - its settings (phpversion, ...)
|
||||||
|
#TODO - its service configuration (PATH, NodeJS production mode...)
|
||||||
|
#TODO this one could be performed in Bash, directly after initiating the subprocess:
|
||||||
|
#TODO - "Environment" clause: `systemctl show $app.service -p "Environment" --value`
|
||||||
|
#TODO - Source "EnvironmentFile" clauses
|
||||||
|
#TODO
|
||||||
|
#TODO find out how to open an interactive Bash shell from Python
|
||||||
|
|
||||||
def app_register_url(app, domain, path):
|
def app_register_url(app, domain, path):
|
||||||
"""
|
"""
|
||||||
Book/register a web path for a given app
|
Book/register a web path for a given app
|
||||||
|
|
Loading…
Add table
Reference in a new issue