From ca9db906a43d073fd362bd8fddba6ad64447a26a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 8 Oct 2022 17:33:42 +0200 Subject: [PATCH] Update upgrade scripts --- upgrade.d/Constant_upgrade/Default_login | 12 +++++++----- upgrade.d/Constant_upgrade/Disable_add_domain | 2 +- upgrade.d/Constant_upgrade/Disable_custom_apps | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/upgrade.d/Constant_upgrade/Default_login b/upgrade.d/Constant_upgrade/Default_login index efebf71..7dc14a6 100644 --- a/upgrade.d/Constant_upgrade/Default_login +++ b/upgrade.d/Constant_upgrade/Default_login @@ -5,9 +5,11 @@ if [ "${0:0:1}" == "/" ]; then script_dir="$(dirname "$0")"; else script_dir="$P MACHINE=$1 # Nom du conteneur -# Ajoute demo:demo par défaut pour le login et le password sur le portail -sed -i "s/id=\"user\" type=\"text\" name=\"user\" placeholder/id=\"user\" type=\"text\" name=\"user\" value=\"demo\" placeholder/" /var/lib/lxc/$MACHINE/rootfs/usr/share/ssowat/portal/login.html -sed -i "s/id=\"password\" type=\"password\" name=\"password\" placeholder/id=\"password\" type=\"password\" name=\"password\" value=\"demo\" placeholder/" /var/lib/lxc/$MACHINE/rootfs/usr/share/ssowat/portal/login.html +# Indique le couple login/mot de passe demo/demo +# Et ajoute demo/demo par défaut dans les champs d'identification +sed -i "3i\
Login: $USER_DEMO / Password: $PASSWORD_DEMO
" /var/lib/lxc/$MACHINE/rootfs/usr/share/ssowat/portal/login.html # Sur le login du portail +sed -i "s/id=\"user\" type=\"text\" name=\"user\"/id=\"user\" type=\"text\" name=\"user\" value=\"$USER_DEMO\"/" /var/lib/lxc/$MACHINE/rootfs/usr/share/ssowat/portal/login.html +sed -i "s/id=\"password\" type=\"password\" name=\"password\"/id=\"password\" type=\"password\" name=\"password\" value=\"$PASSWORD_DEMO\"/" /var/lib/lxc/$MACHINE/rootfs/usr/share/ssowat/portal/login.html -# Idem sur l'admin -sed -i "s/type=\"password\" id=\"password\" name=\"password\" class/type=\"password\" id=\"password\" name=\"password\" value=\"demo\" class/" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/login.ms +#sed -i "17i\   Password: $YUNO_PWD" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/login.ms # Et sur le login admin +#sed -i "s/type=\"password\" id=\"password\" name=\"password\"/type=\"password\" id=\"password\" name=\"password\" value=\"$YUNO_PWD\"/" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/login.ms diff --git a/upgrade.d/Constant_upgrade/Disable_add_domain b/upgrade.d/Constant_upgrade/Disable_add_domain index a9261e3..0638bf2 100644 --- a/upgrade.d/Constant_upgrade/Disable_add_domain +++ b/upgrade.d/Constant_upgrade/Disable_add_domain @@ -5,5 +5,5 @@ if [ "${0:0:1}" == "/" ]; then script_dir="$(dirname "$0")"; else script_dir="$P MACHINE=$1 # Nom du conteneur -# Disable the button to add a new domain +# Désactive l'ajout de domaine, pour éviter surtout les nohost sed -i "s@@@g" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/domain/domain_add.ms diff --git a/upgrade.d/Constant_upgrade/Disable_custom_apps b/upgrade.d/Constant_upgrade/Disable_custom_apps index 85baca2..385f31b 100644 --- a/upgrade.d/Constant_upgrade/Disable_custom_apps +++ b/upgrade.d/Constant_upgrade/Disable_custom_apps @@ -5,5 +5,5 @@ if [ "${0:0:1}" == "/" ]; then script_dir="$(dirname "$0")"; else script_dir="$P MACHINE=$1 # Nom du conteneur -# Disable the button to install a custom app +# Désactive l'installation d'app custom sed -i "s@{{t 'install'}}@{{t 'install'}}@g" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/app/app_catalog_category.ms