mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'dev' into enh-apps-v2
This commit is contained in:
commit
95173e5bde
11 changed files with 46 additions and 30 deletions
|
@ -24,6 +24,9 @@ def _parse_cli_args():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--quiet", action="store_true", default=False, help="Don't produce any output"
|
"--quiet", action="store_true", default=False, help="Don't produce any output"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--version", action="store_true", default=False, help="Display YunoHost packages versions (alias to 'yunohost tools versions')"
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--timeout",
|
"--timeout",
|
||||||
type=int,
|
type=int,
|
||||||
|
@ -50,6 +53,7 @@ def _parse_cli_args():
|
||||||
|
|
||||||
|
|
||||||
# Stupid PATH management because sometimes (e.g. some cron job) PATH is only /usr/bin:/bin ...
|
# Stupid PATH management because sometimes (e.g. some cron job) PATH is only /usr/bin:/bin ...
|
||||||
|
|
||||||
default_path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
default_path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
if os.environ["PATH"] != default_path:
|
if os.environ["PATH"] != default_path:
|
||||||
os.environ["PATH"] = default_path + ":" + os.environ["PATH"]
|
os.environ["PATH"] = default_path + ":" + os.environ["PATH"]
|
||||||
|
@ -66,6 +70,9 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
parser, opts, args = _parse_cli_args()
|
parser, opts, args = _parse_cli_args()
|
||||||
|
|
||||||
|
if opts.version:
|
||||||
|
args = ["tools", "versions"]
|
||||||
|
|
||||||
# Execute the action
|
# Execute the action
|
||||||
yunohost.cli(
|
yunohost.cli(
|
||||||
debug=opts.debug,
|
debug=opts.debug,
|
||||||
|
|
|
@ -19,7 +19,7 @@ paste_data() {
|
||||||
[[ -z "$json" ]] && _die "Unable to post the data to the server."
|
[[ -z "$json" ]] && _die "Unable to post the data to the server."
|
||||||
|
|
||||||
key=$(echo "$json" \
|
key=$(echo "$json" \
|
||||||
| python -c 'import json,sys;o=json.load(sys.stdin);print o["key"]' \
|
| python3 -c 'import json,sys;o=json.load(sys.stdin);print(o["key"])' \
|
||||||
2>/dev/null)
|
2>/dev/null)
|
||||||
[[ -z "$key" ]] && _die "Unable to parse the server response."
|
[[ -z "$key" ]] && _die "Unable to parse the server response."
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require "fileinto";
|
require "fileinto";
|
||||||
if header :contains "X-Spam-Flag" "YES" {
|
if header :contains "X-Spam-Flag" "Yes" {
|
||||||
fileinto "Junk";
|
fileinto "Junk";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require ["fileinto"];
|
require ["fileinto"];
|
||||||
if header :is "X-Spam" "yes" {
|
if header :is "X-Spam" "Yes" {
|
||||||
fileinto "Junk";
|
fileinto "Junk";
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,6 @@ do_post_regen() {
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl disable avahi-daemon.socket --quiet --now 2>/dev/null || true
|
|
||||||
systemctl disable avahi-daemon --quiet --now 2>/dev/null || true
|
|
||||||
|
|
||||||
# Legacy stuff to enable the new yunomdns service on legacy systems
|
# Legacy stuff to enable the new yunomdns service on legacy systems
|
||||||
if [[ -e /etc/avahi/avahi-daemon.conf ]] && grep -q 'yunohost' /etc/avahi/avahi-daemon.conf; then
|
if [[ -e /etc/avahi/avahi-daemon.conf ]] && grep -q 'yunohost' /etc/avahi/avahi-daemon.conf; then
|
||||||
systemctl enable yunomdns --now --quiet
|
systemctl enable yunomdns --now --quiet
|
||||||
|
|
|
@ -739,5 +739,8 @@
|
||||||
"password_too_long": "Veuillez choisir un mot de passe de moins de 127 caractères",
|
"password_too_long": "Veuillez choisir un mot de passe de moins de 127 caractères",
|
||||||
"domain_cannot_add_muc_upload": "Vous ne pouvez pas ajouter de domaines commençant par 'muc.'. Ce type de nom est réservé à la fonction de chat XMPP multi-utilisateurs intégrée à YunoHost.",
|
"domain_cannot_add_muc_upload": "Vous ne pouvez pas ajouter de domaines commençant par 'muc.'. Ce type de nom est réservé à la fonction de chat XMPP multi-utilisateurs intégrée à YunoHost.",
|
||||||
"group_update_aliases": "Mise à jour des alias du groupe '{group}'.",
|
"group_update_aliases": "Mise à jour des alias du groupe '{group}'.",
|
||||||
"group_no_change": "Rien à mettre à jour pour le groupe '{group}'"
|
"group_no_change": "Rien à mettre à jour pour le groupe '{group}'",
|
||||||
|
"global_settings_setting_portal_theme": "Thème du portail",
|
||||||
|
"global_settings_setting_portal_theme_help": "Pour plus d'informations sur la création de thèmes de portail personnalisés, voir https://yunohost.org/theming",
|
||||||
|
"global_settings_setting_passwordless_sudo": "Permettre aux administrateurs d'utiliser 'sudo' sans retaper leur mot de passe"
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,5 +737,9 @@
|
||||||
"global_settings_setting_ssh_compatibility": "Compatibilidade SSH",
|
"global_settings_setting_ssh_compatibility": "Compatibilidade SSH",
|
||||||
"migration_description_0026_new_admins_group": "Migrar ao novo sistema de 'admins múltiples'",
|
"migration_description_0026_new_admins_group": "Migrar ao novo sistema de 'admins múltiples'",
|
||||||
"group_update_aliases": "Actualizando os alias do grupo '{group}'",
|
"group_update_aliases": "Actualizando os alias do grupo '{group}'",
|
||||||
"group_no_change": "Nada que cambiar para o grupo '{group}'"
|
"group_no_change": "Nada que cambiar para o grupo '{group}'",
|
||||||
|
"domain_cannot_add_muc_upload": "Non podes engadir dominios que comecen por 'muc.'. Este tipo de dominio está reservado para as salas de conversa de XMPP integradas en YunoHost.",
|
||||||
|
"global_settings_setting_passwordless_sudo": "Permitir a Admins usar 'sudo' sen ter que volver a escribir o contrasinal",
|
||||||
|
"global_settings_setting_portal_theme": "Decorado do Portal",
|
||||||
|
"global_settings_setting_portal_theme_help": "Tes máis info acerca da creación de decorados para o portal de acceso en https://yunohost.org/theming"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"action_invalid": "Acção Inválida '{action}'",
|
"action_invalid": "Ação inválida '{action}'",
|
||||||
"admin_password": "Senha de administração",
|
"admin_password": "Senha de administração",
|
||||||
"app_already_installed": "{app} já está instalada",
|
"app_already_installed": "{app} já está instalada",
|
||||||
"app_extraction_failed": "Não foi possível extrair os arquivos para instalação",
|
"app_extraction_failed": "Não foi possível extrair os arquivos para instalação",
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
"app_action_cannot_be_ran_because_required_services_down": "Estes serviços devem estar funcionado para executar esta ação: {services}. Tente reiniciá-los para continuar (e possivelmente investigar o porquê de não estarem funcionado).",
|
"app_action_cannot_be_ran_because_required_services_down": "Estes serviços devem estar funcionado para executar esta ação: {services}. Tente reiniciá-los para continuar (e possivelmente investigar o porquê de não estarem funcionado).",
|
||||||
"app_action_broke_system": "Esta ação parece ter quebrado estes serviços importantes: {services}",
|
"app_action_broke_system": "Esta ação parece ter quebrado estes serviços importantes: {services}",
|
||||||
"already_up_to_date": "Nada a ser feito. Tudo já está atualizado.",
|
"already_up_to_date": "Nada a ser feito. Tudo já está atualizado.",
|
||||||
"additional_urls_already_removed": "A URL adicional '{url}'já está removida para a permissão '{permission}'",
|
"additional_urls_already_removed": "A URL adicional '{url}' já foi removida da permissão '{permission}'",
|
||||||
"additional_urls_already_added": "A URL adicional '{url}' já está adicionada para a permissão '{permission}'",
|
"additional_urls_already_added": "A URL adicional '{url}' já está adicionada para a permissão '{permission}'",
|
||||||
"app_install_script_failed": "Ocorreu um erro dentro do script de instalação do aplicativo",
|
"app_install_script_failed": "Ocorreu um erro dentro do script de instalação do aplicativo",
|
||||||
"app_install_failed": "Não foi possível instalar {app}: {error}",
|
"app_install_failed": "Não foi possível instalar {app}: {error}",
|
||||||
|
@ -245,5 +245,6 @@
|
||||||
"diagnosis_basesystem_hardware_model": "O modelo do servidor é {model}",
|
"diagnosis_basesystem_hardware_model": "O modelo do servidor é {model}",
|
||||||
"diagnosis_backports_in_sources_list": "Parece que o apt (o gerenciador de pacotes) está configurado para usar o repositório backport. A não ser que você saiba o que você esteá fazendo, desencorajamos fortemente a instalação de pacotes de backports porque é provável que crie instabilidades ou conflitos no seu sistema.",
|
"diagnosis_backports_in_sources_list": "Parece que o apt (o gerenciador de pacotes) está configurado para usar o repositório backport. A não ser que você saiba o que você esteá fazendo, desencorajamos fortemente a instalação de pacotes de backports porque é provável que crie instabilidades ou conflitos no seu sistema.",
|
||||||
"certmanager_cert_renew_success": "Certificado Let's Encrypt renovado para o domínio '{domain}'",
|
"certmanager_cert_renew_success": "Certificado Let's Encrypt renovado para o domínio '{domain}'",
|
||||||
"certmanager_warning_subdomain_dns_record": "O subdomínio '{subdomain}' não resolve para o mesmo IP que '{domain}'. Algumas funcionalidades não estarão disponíveis até que você conserte isto e regenere o certificado."
|
"certmanager_warning_subdomain_dns_record": "O subdomínio '{subdomain}' não resolve para o mesmo IP que '{domain}'. Algumas funcionalidades não estarão disponíveis até que você conserte isto e regenere o certificado.",
|
||||||
|
"admins": "Admins"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"app_packaging_format_not_supported": "Túto aplikáciu nie je možné nainštalovať, pretože formát balíčkov, ktorý používa, nie je podporovaný Vašou verziou YunoHost. Mali by ste zvážiť aktualizovanie Vášho systému.",
|
"app_packaging_format_not_supported": "Túto aplikáciu nie je možné nainštalovať, pretože formát balíčkov, ktorý používa, nie je podporovaný Vašou verziou YunoHost. Mali by ste zvážiť aktualizovanie Vášho systému.",
|
||||||
"app_remove_after_failed_install": "Aplikácia sa po chybe počas inštalácie odstraňuje…",
|
"app_remove_after_failed_install": "Aplikácia sa po chybe počas inštalácie odstraňuje…",
|
||||||
"app_removed": "{app} bola odinštalovaná",
|
"app_removed": "{app} bola odinštalovaná",
|
||||||
"app_requirements_checking": "Kontrolujem programy vyžadované aplikáciou {app}…",
|
"app_requirements_checking": "Kontrolujem požiadavky aplikácie {app}…",
|
||||||
"app_restore_failed": "Nepodarilo sa obnoviť {app}: {error}",
|
"app_restore_failed": "Nepodarilo sa obnoviť {app}: {error}",
|
||||||
"app_restore_script_failed": "Chyba nastala vo vnútri skriptu na obnovu aplikácie",
|
"app_restore_script_failed": "Chyba nastala vo vnútri skriptu na obnovu aplikácie",
|
||||||
"app_sources_fetch_failed": "Nepodarilo sa získať zdrojové súbory, je adresa URL správna?",
|
"app_sources_fetch_failed": "Nepodarilo sa získať zdrojové súbory, je adresa URL správna?",
|
||||||
|
@ -240,5 +240,14 @@
|
||||||
"dyndns_could_not_check_available": "Nepodarilo sa zistiť, či je {domain} dostupná na {provider}.",
|
"dyndns_could_not_check_available": "Nepodarilo sa zistiť, či je {domain} dostupná na {provider}.",
|
||||||
"dyndns_unavailable": "Doména '{domain}' nie je dostupná.",
|
"dyndns_unavailable": "Doména '{domain}' nie je dostupná.",
|
||||||
"log_available_on_yunopaste": "Tento záznam je teraz dostupný na {url}",
|
"log_available_on_yunopaste": "Tento záznam je teraz dostupný na {url}",
|
||||||
"updating_apt_cache": "Získavam dostupné aktualizácie pre systémové balíčky…"
|
"updating_apt_cache": "Získavam dostupné aktualizácie systémových balíčkov…",
|
||||||
|
"admins": "Správcovia",
|
||||||
|
"app_action_failed": "Nepodarilo sa spustiť akciu {action} v aplikácii {app}",
|
||||||
|
"app_manifest_install_ask_init_admin_permission": "Kto má mať prístup k nastaveniam určených správcovi tejto aplikácie? (Nastavenie môžete neskôr zmeniť)",
|
||||||
|
"ask_admin_fullname": "Celé meno správcu",
|
||||||
|
"ask_admin_username": "Používateľské meno správcu",
|
||||||
|
"ask_fullname": "Celé meno",
|
||||||
|
"all_users": "Všetci používatelia YunoHost",
|
||||||
|
"app_manifest_install_ask_init_main_permission": "Kto má mať prístup k tejto aplikácii? (Nastavenie môžete neskôr zmeniť)",
|
||||||
|
"certmanager_cert_install_failed": "Inštalácia Let's Encrypt certifikátu pre {domains} skončila s chybou"
|
||||||
}
|
}
|
|
@ -37,14 +37,6 @@ _global:
|
||||||
authentication:
|
authentication:
|
||||||
api: ldap_admin
|
api: ldap_admin
|
||||||
cli: null
|
cli: null
|
||||||
arguments:
|
|
||||||
-v:
|
|
||||||
full: --version
|
|
||||||
help: Display YunoHost packages versions
|
|
||||||
action: callback
|
|
||||||
callback:
|
|
||||||
method: yunohost.utils.system.ynh_packages_version
|
|
||||||
return: true
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# User #
|
# User #
|
||||||
|
@ -553,9 +545,7 @@ domain:
|
||||||
action_help: Check the current main domain, or change it
|
action_help: Check the current main domain, or change it
|
||||||
deprecated_alias:
|
deprecated_alias:
|
||||||
- maindomain
|
- maindomain
|
||||||
api:
|
api: PUT /domains/<new_main_domain>/main
|
||||||
- GET /domains/main
|
|
||||||
- PUT /domains/<new_main_domain>/main
|
|
||||||
arguments:
|
arguments:
|
||||||
-n:
|
-n:
|
||||||
full: --new-main-domain
|
full: --new-main-domain
|
||||||
|
|
|
@ -455,11 +455,16 @@ investigate :
|
||||||
-- Certificate Manager
|
-- Certificate Manager
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import smtplib
|
try:
|
||||||
|
import smtplib
|
||||||
|
|
||||||
smtp = smtplib.SMTP("localhost")
|
smtp = smtplib.SMTP("localhost")
|
||||||
smtp.sendmail(from_, [to_], message.encode("utf-8"))
|
smtp.sendmail(from_, [to_], message.encode("utf-8"))
|
||||||
smtp.quit()
|
smtp.quit()
|
||||||
|
except Exception as e:
|
||||||
|
# Dont miserably crash the whole auto renew cert when one renewal fails ...
|
||||||
|
# cf boring cases like https://github.com/YunoHost/issues/issues/2102
|
||||||
|
logger.exception(f"Failed to send mail about cert renewal failure ... : {e}")
|
||||||
|
|
||||||
|
|
||||||
def _check_acme_challenge_configuration(domain):
|
def _check_acme_challenge_configuration(domain):
|
||||||
|
|
Loading…
Add table
Reference in a new issue