mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Allow to use mypads in subpath
This commit is contained in:
parent
d62ad8cfa6
commit
af8d389339
7 changed files with 12 additions and 41 deletions
|
@ -40,8 +40,6 @@ Supported, **without LDAP nor SSO**.
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* If you ask to install the plugin mypads, you have to install in the root of a dedicated domain or a sub domain. Else, mypads will be inaccessible.
|
|
||||||
|
|
||||||
## Additionnal informations
|
## Additionnal informations
|
||||||
|
|
||||||
* This package will install the following plugins:
|
* This package will install the following plugins:
|
||||||
|
@ -62,10 +60,6 @@ Supported, **without LDAP nor SSO**.
|
||||||
* ep_table_of_contents - *View a table of contents for your pad*
|
* ep_table_of_contents - *View a table of contents for your pad*
|
||||||
* ep_user_font_size - *User Pad Contents font size can be set in settings, this does not effect other peoples views*
|
* ep_user_font_size - *User Pad Contents font size can be set in settings, this does not effect other peoples views*
|
||||||
|
|
||||||
* Because there's no ldap support with mypads plugin, no user is created at the installation.
|
|
||||||
You have to connect to the admin panel to create the first users.
|
|
||||||
Login and password are those you chose during the installation.
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues
|
* Report a bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues
|
||||||
|
|
|
@ -40,8 +40,6 @@ Supportée, **sans LDAP ni SSO**.
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Si vous demandez d'installer le plugin mypads, vous devez installer à la racine d'un domaine ou d'un sous-domaine dédié. Sinon, mypads sera inaccessible.
|
|
||||||
|
|
||||||
## Informations additionnelles
|
## Informations additionnelles
|
||||||
|
|
||||||
* Ce paquet installera les plugins suivants:
|
* Ce paquet installera les plugins suivants:
|
||||||
|
@ -62,10 +60,6 @@ Supportée, **sans LDAP ni SSO**.
|
||||||
* ep_table_of_contents - *Voir une table des matières pour votre pad*
|
* ep_table_of_contents - *Voir une table des matières pour votre pad*
|
||||||
* ep_user_font_size - *Permet de définir taille de la police dans les paramètres, cela n'affecte pas les vues des autres personnes*.
|
* ep_user_font_size - *Permet de définir taille de la police dans les paramètres, cela n'affecte pas les vues des autres personnes*.
|
||||||
|
|
||||||
* Parce qu'il n'y a pas de support ldap avec le plugin mypads, aucun utilisateur n'est créé lors de l'installation.
|
|
||||||
Vous devez vous connecter au panneau d'administration pour créer les premiers utilisateurs.
|
|
||||||
Login et mot de passe sont ceux que vous avez choisis lors de l'installation.
|
|
||||||
|
|
||||||
## Liens
|
## Liens
|
||||||
|
|
||||||
* Reporter un bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues
|
* Reporter un bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;; Test complet avec libreoffice sans mypads
|
;; Test complet avec libreoffice et mypads
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/path" (PATH)
|
path="/path" (PATH)
|
||||||
|
@ -7,8 +7,8 @@
|
||||||
language="en"
|
language="en"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
export="libreoffice"
|
export="libreoffice"
|
||||||
mypads=0
|
mypads=1
|
||||||
useldap=0
|
useldap=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
port_already_use=1 (9001)
|
port_already_use=1 (9001)
|
||||||
change_url=1
|
change_url=1
|
||||||
;; Test avec mypads
|
;; Test sans mypads
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/path" (PATH)
|
path="/path" (PATH)
|
||||||
|
@ -31,12 +31,12 @@
|
||||||
language="en"
|
language="en"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
export="libreoffice"
|
export="libreoffice"
|
||||||
mypads=1
|
mypads=0
|
||||||
useldap=1
|
useldap=0
|
||||||
; Checks
|
; Checks
|
||||||
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
|
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
;; Test abiword
|
;; Test abiword
|
||||||
; Manifest
|
; Manifest
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
useldap=0
|
useldap=0
|
||||||
; Checks
|
; Checks
|
||||||
setup_root=1
|
setup_root=1
|
||||||
|
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
|
||||||
;; Test sans export
|
;; Test sans export
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
|
|
|
@ -39,12 +39,8 @@
|
||||||
"en": "Choose a path for Etherpad",
|
"en": "Choose a path for Etherpad",
|
||||||
"fr": "Choisissez un chemin pour Etherpad"
|
"fr": "Choisissez un chemin pour Etherpad"
|
||||||
},
|
},
|
||||||
"help": {
|
"example": "/pad",
|
||||||
"en": "If you choose to install mypads plugin, etherpad has to be on /",
|
"default": "/pad"
|
||||||
"fr": "Si vous choisissez d'installer le plugin mypads, etherpad doit être sur /"
|
|
||||||
},
|
|
||||||
"example": "/",
|
|
||||||
"default": "/"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
|
|
|
@ -32,15 +32,6 @@ test -n "$new_path" || new_path="/"
|
||||||
new_path=$(ynh_normalize_url_path $new_path)
|
new_path=$(ynh_normalize_url_path $new_path)
|
||||||
old_path=$(ynh_normalize_url_path $old_path)
|
old_path=$(ynh_normalize_url_path $old_path)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF THE PATH CAN BE CHANGED
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ "$new_path" != "/" ] && [ $mypads -eq 1 ]
|
|
||||||
then
|
|
||||||
ynh_die "Mypads needs to be installed on the root of a domain or a subdomain."
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -48,11 +48,6 @@ then
|
||||||
fi
|
fi
|
||||||
ynh_print_ON
|
ynh_print_ON
|
||||||
|
|
||||||
if [ "$path_url" != "/" ] && [ $mypads -eq 1 ]
|
|
||||||
then
|
|
||||||
ynh_die "Mypads needs to be installed on the root of a domain or a subdomain."
|
|
||||||
fi
|
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
|
|
||||||
|
@ -253,7 +248,7 @@ then
|
||||||
ynh_replace_string "^ *\"FOOTER\": .*2.0" "& | <a href='../admin'>Etherpad admin</a>" $final_path/node_modules/ep_mypads/static/l10n/fr.json
|
ynh_replace_string "^ *\"FOOTER\": .*2.0" "& | <a href='../admin'>Etherpad admin</a>" $final_path/node_modules/ep_mypads/static/l10n/fr.json
|
||||||
|
|
||||||
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
|
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
|
||||||
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
|
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -233,7 +233,7 @@ ynh_add_systemd_config
|
||||||
if [ $mypads -eq 1 ]
|
if [ $mypads -eq 1 ]
|
||||||
then
|
then
|
||||||
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
|
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
|
||||||
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
|
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue