diff --git a/scripts/install b/scripts/install
index 40a8fc6..cb8545b 100644
--- a/scripts/install
+++ b/scripts/install
@@ -144,6 +144,11 @@ sudo chown -R etherpad: $final_path/node_modules
# Ajoute un lien vers etherpad pour créer des pads anonymes depuis Mypads.
sudo sed -i "s@^ *\"DESCRIPTION\": .*@&Pads anonymes@g" $final_path/node_modules/ep_mypads/static/l10n/fr.json
sudo sed -i "s@^ *\"DESCRIPTION\": .*@&Anonymous pads@g" $final_path/node_modules/ep_mypads/static/l10n/en.json
+# Et un lien vers l'admin etherpad depuis Mypads.
+sudo sed -i "s@^ *\"FOOTER\": .*2.0@& | Etherpad admin@g" $final_path/node_modules/ep_mypads/static/l10n/en.json $final_path/node_modules/ep_mypads/static/l10n/fr.json
+
+mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
+sudo sed -i "$mod_line s@div>@&\n\t
Mypads@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
# Démarre etherpad
echo "Démarrage d'etherpad" >&2
@@ -153,15 +158,9 @@ PID_TAIL=$! # Récupère le PID de la commande tail, qui est passée en arrière
sudo service $app start # Démarre etherpad. Le démarrage est fait le plus tôt possible, car il est très long...
# Make app public if necessary
-if [ "$is_public" = "Yes" ];
-then
- # Modifie le domaine pour qu'il passe dans une regex
- domain_regex=$(echo "$domain" | sed 's@-@.@g')
- CHECK_VAR "$domain_regex" "domain_regex empty"
- sudo yunohost app setting $app skipped_regex -v "$domain_regex"
- sudo yunohost app setting $app protected_regex -v "$domain_regex/admin","$domain_regex/mypads/%?/admin" # Protège l'accès de l'administration d'etherpad et de mypads.
+if [ "$is_public" = "Yes" ]; then
+ sudo yunohost app setting $app skipped_uris -v "/"
fi
-sudo yunohost app setting $app path -v /mypads # /mypads vient se rajouter à l'adresse de etherpad pour y être associé sur le portail.
# Recharge la configuration Nginx
sudo service nginx reload
diff --git a/scripts/upgrade b/scripts/upgrade
index 4858985..8db910a 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -66,6 +66,11 @@ sudo systemctl enable $app.service
# Ajoute un lien vers etherpad pour créer des pads anonymes depuis Mypads.
sudo sed -i "s@^ *\"DESCRIPTION\": .*@&Pads anonymes@g" $final_path/node_modules/ep_mypads/static/l10n/fr.json
sudo sed -i "s@^ *\"DESCRIPTION\": .*@&Anonymous pads@g" $final_path/node_modules/ep_mypads/static/l10n/en.json
+# Et un lien vers l'admin etherpad depuis Mypads.
+sudo sed -i "s@^ *\"FOOTER\": .*2.0@& | Etherpad admin@g" $final_path/node_modules/ep_mypads/static/l10n/en.json $final_path/node_modules/ep_mypads/static/l10n/fr.json
+
+mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
+sudo sed -i "$mod_line s@div>@&\n\t
Mypads@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
# Démarre etherpad
echo "Démarrage d'etherpad" >&2
@@ -75,15 +80,9 @@ PID_TAIL=$! # Récupère le PID de la commande tail, qui est passée en arrière
sudo service $app start # Démarre etherpad. Le démarrage est fait le plus tôt possible, car il est très long...
# Make app public if necessary
-if [ "$is_public" = "Yes" ];
-then
- # Modifie le domaine pour qu'il passe dans une regex
- domain_regex=$(echo "$domain" | sed 's@-@.@g')
- CHECK_VAR "$domain_regex" "domain_regex empty"
- sudo yunohost app setting $app skipped_regex -v "$domain_regex"
- sudo yunohost app setting $app protected_regex -v "$domain_regex.*admin" # Protège l'accès de l'administration d'etherpad et de mypads.
+if [ "$is_public" = "Yes" ]; then
+ sudo yunohost app setting $app skipped_uris -v "/"
fi
-sudo yunohost app setting $app path -v /mypads # /mypads vient se rajouter à l'adresse de etherpad pour y être associé sur le portail.
# Recharge la configuration Nginx
sudo service nginx reload