Merge pull request #16 from YunoHost/fixes

Update upgrade scripts
This commit is contained in:
yalh76 2022-10-08 17:34:00 +02:00 committed by GitHub
commit b1d8411935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View file

@ -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\<center>Login: $USER_DEMO / Password: $PASSWORD_DEMO</center>" /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\&emsp;&emsp;&emsp;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

View file

@ -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@<input type=\"submit\" role=\"button\" class=\"btn btn-success slide back\" value=\"{{t 'add'}}\">@<input type=\"\" role=\"\" class=\"btn btn-success slide back\" value=\"{{t 'add'}}\">@g" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/domain/domain_add.ms

View file

@ -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@<a role=\"button\" class=\"btn btn-success slide\">{{t 'install'}}</a>@<a role=\"\" class=\"btn btn-success slide\">{{t 'install'}}</a>@g" /var/lib/lxc/$MACHINE/rootfs/usr/share/yunohost/admin/views/app/app_catalog_category.ms