mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Propagate changes from moulinette
This commit is contained in:
parent
26e6b4a414
commit
7bfa15d471
5 changed files with 15 additions and 11 deletions
|
@ -4,8 +4,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
sys.path.insert(0, "/usr/lib/moulinette/")
|
|
||||||
import yunohost
|
import yunohost
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
#! /usr/bin/python3
|
#! /usr/bin/python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
sys.path.insert(0, "/usr/lib/moulinette/")
|
|
||||||
import yunohost
|
import yunohost
|
||||||
|
|
||||||
# Default server configuration
|
# Default server configuration
|
||||||
|
|
5
debian/install
vendored
5
debian/install
vendored
|
@ -1,11 +1,10 @@
|
||||||
bin/* /usr/bin/
|
bin/* /usr/bin/
|
||||||
share/* /usr/share/yunohost/
|
share/* /usr/share/yunohost/
|
||||||
share/actionsmap.yml /usr/share/moulinette/actionsmap/yunohost.yml
|
|
||||||
hooks/* /usr/share/yunohost/hooks/
|
hooks/* /usr/share/yunohost/hooks/
|
||||||
helpers/* /usr/share/yunohost/helpers.d/
|
helpers/* /usr/share/yunohost/helpers.d/
|
||||||
conf/* /usr/share/yunohost/conf/
|
conf/* /usr/share/yunohost/conf/
|
||||||
|
locales/* /usr/share/yunohost/locales/
|
||||||
doc/yunohost.8.gz /usr/share/man/man8/
|
doc/yunohost.8.gz /usr/share/man/man8/
|
||||||
doc/bash-completion.sh /etc/bash_completion.d/yunohost
|
doc/bash-completion.sh /etc/bash_completion.d/yunohost
|
||||||
conf/metronome/modules/* /usr/lib/metronome/modules/
|
conf/metronome/modules/* /usr/lib/metronome/modules/
|
||||||
locales/* /usr/lib/moulinette/yunohost/locales/
|
src/* /usr/lib/python3/dist-packages/yunohost/
|
||||||
src/* /usr/lib/moulinette/yunohost/
|
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
# Global parameters #
|
# Global parameters #
|
||||||
#############################
|
#############################
|
||||||
_global:
|
_global:
|
||||||
name: yunohost.admin
|
namespace: yunohost
|
||||||
|
cookie_name: yunohost.admin
|
||||||
authentication:
|
authentication:
|
||||||
api: ldap_admin
|
api: ldap_admin
|
||||||
cli: null
|
cli: null
|
||||||
|
|
|
@ -22,7 +22,14 @@ def cli(debug, quiet, output_as, timeout, args, parser):
|
||||||
if not is_installed():
|
if not is_installed():
|
||||||
check_command_is_valid_before_postinstall(args)
|
check_command_is_valid_before_postinstall(args)
|
||||||
|
|
||||||
ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
|
ret = moulinette.cli(
|
||||||
|
args,
|
||||||
|
actionsmap="/usr/share/yunohost/actionsmap.yml",
|
||||||
|
locales_dir="/usr/share/yunohost/locales/",
|
||||||
|
output_as=output_as,
|
||||||
|
timeout=timeout,
|
||||||
|
top_parser=parser
|
||||||
|
)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,6 +46,8 @@ def api(debug, host, port):
|
||||||
ret = moulinette.api(
|
ret = moulinette.api(
|
||||||
host=host,
|
host=host,
|
||||||
port=port,
|
port=port,
|
||||||
|
actionsmap="/usr/share/yunohost/actionsmap.yml",
|
||||||
|
locales_dir="/usr/share/yunohost/locales/",
|
||||||
routes={("GET", "/installed"): is_installed_api},
|
routes={("GET", "/installed"): is_installed_api},
|
||||||
)
|
)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
@ -78,7 +87,7 @@ def init(interface="cli", debug=False, quiet=False, logdir="/var/log/yunohost"):
|
||||||
def init_i18n():
|
def init_i18n():
|
||||||
# This should only be called when not willing to go through moulinette.cli
|
# This should only be called when not willing to go through moulinette.cli
|
||||||
# or moulinette.api but still willing to call m18n.n/g...
|
# or moulinette.api but still willing to call m18n.n/g...
|
||||||
m18n.load_namespace("yunohost")
|
m18n.set_locales_dir("/usr/share/yunohost/locales/")
|
||||||
m18n.set_locale(get_locale())
|
m18n.set_locale(get_locale())
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue