mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Merge pull request #131 from YunoHost-Apps/remove-deprecated-page-view
Remove page_view
This commit is contained in:
commit
abf1375ba8
12 changed files with 42 additions and 80 deletions
|
@ -56,13 +56,13 @@ You can also find a configuration file for Etherpad at this path `/var/www/ether
|
||||||
* [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Adds author names to span titles*
|
* [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Adds author names to span titles*
|
||||||
* [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Automatically disconnects user after some period of time (Prevent server overload)*
|
* [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Automatically disconnects user after some period of time (Prevent server overload)*
|
||||||
* [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Adds comments on sidebar and link it to the text.*
|
* [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Adds comments on sidebar and link it to the text.*
|
||||||
|
* [ep_countable](https://www.npmjs.com/package/ep_countable) - *Adds paragraphs, words and characters count*
|
||||||
* [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Delete pads which were never edited*
|
* [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Delete pads which were never edited*
|
||||||
* [ep_font_color](https://www.npmjs.com/package/ep_font_color) - *Apply colors to fonts*
|
* [ep_font_color](https://www.npmjs.com/package/ep_font_color) - *Apply colors to fonts*
|
||||||
* [ep_font_size](https://www.npmjs.com/package/ep_font_size) - *Add support for Font Sizes*
|
* [ep_font_size](https://www.npmjs.com/package/ep_font_size) - *Add support for Font Sizes*
|
||||||
* [ep_headings2](https://www.npmjs.com/package/ep_headings2) - *Adds heading support to Etherpad Lite.*
|
* [ep_headings2](https://www.npmjs.com/package/ep_headings2) - *Adds heading support to Etherpad Lite.*
|
||||||
* [ep_markdown](https://www.npmjs.com/package/ep_markdown) - *Edit and Export as Markdown in Etherpad*
|
* [ep_markdown](https://www.npmjs.com/package/ep_markdown) - *Edit and Export as Markdown in Etherpad*
|
||||||
* [ep_mypads](https://www.npmjs.com/package/ep_mypads) - *Groups and private pads for etherpad*
|
* [ep_mypads](https://www.npmjs.com/package/ep_mypads) - *Groups and private pads for etherpad*
|
||||||
* [ep_page_view](https://www.npmjs.com/package/ep_page_view) - *Add support to do 'page view', with a toggle on/off option in Settings, also Page Breaks with Control Enter*
|
|
||||||
* [ep_spellcheck](https://www.npmjs.com/package/ep_spellcheck) - *Add support to do 'Spell checking'*
|
* [ep_spellcheck](https://www.npmjs.com/package/ep_spellcheck) - *Add support to do 'Spell checking'*
|
||||||
* [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Add support for Subscript and Superscript*
|
* [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Add support for Subscript and Superscript*
|
||||||
* [ep_table_of_contents](https://www.npmjs.com/package/ep_table_of_contents) - *View a table of contents for your pad*
|
* [ep_table_of_contents](https://www.npmjs.com/package/ep_table_of_contents) - *View a table of contents for your pad*
|
||||||
|
|
|
@ -55,13 +55,13 @@ Vous pouvez accéder à deux panneaux d'administration différents, pour Etherpa
|
||||||
* [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Ajoute des noms d'auteurs*
|
* [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Ajoute des noms d'auteurs*
|
||||||
* [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Déconnecte automatiquement l'utilisateur après une certaine période de temps (Prévient la surcharge du serveur)*
|
* [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Déconnecte automatiquement l'utilisateur après une certaine période de temps (Prévient la surcharge du serveur)*
|
||||||
* [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Ajoute des commentaires sur la sidebar et le lie au texte.*
|
* [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Ajoute des commentaires sur la sidebar et le lie au texte.*
|
||||||
|
* [ep_countable](https://www.npmjs.com/package/ep_countable) - *Ajoute l'afficher le nombre de paragraphes, de mots et de caractères*
|
||||||
* [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Supprimer les pads qui n'ont jamais été édités*
|
* [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Supprimer les pads qui n'ont jamais été édités*
|
||||||
* [ep_font_color](https://www.npmjs.com/package/ep_font_color) - *Appliquer les couleurs aux polices de caractères*
|
* [ep_font_color](https://www.npmjs.com/package/ep_font_color) - *Appliquer les couleurs aux polices de caractères*
|
||||||
* [ep_font_size](https://www.npmjs.com/package/ep_font_size) - *Permet de définir la taille de la police*.
|
* [ep_font_size](https://www.npmjs.com/package/ep_font_size) - *Permet de définir la taille de la police*.
|
||||||
* [ep_headings2](https://www.npmjs.com/package/ep_headings2) - *Ajoute le support de titre à Etherpad Lite.*
|
* [ep_headings2](https://www.npmjs.com/package/ep_headings2) - *Ajoute le support de titre à Etherpad Lite.*
|
||||||
* [ep_markdown](https://www.npmjs.com/package/ep_markdown) - *Modifier et exporter en tant que Markdown dans Etherpad*
|
* [ep_markdown](https://www.npmjs.com/package/ep_markdown) - *Modifier et exporter en tant que Markdown dans Etherpad*
|
||||||
* [ep_mypads](https://www.npmjs.com/package/ep_mypads) - *Groupes et pads privés pour etherpad*
|
* [ep_mypads](https://www.npmjs.com/package/ep_mypads) - *Groupes et pads privés pour etherpad*
|
||||||
* [ep_page_view](https://www.npmjs.com/package/ep_page_view) - *Ajouter la prise en charge de 'page view', avec une option d'activation/désactivation dans Paramètres, ainsi que 'Page Breaks' avec Control + Entrée*
|
|
||||||
* [ep_spellcheck](https://www.npmjs.com/package/ep_spellcheck) - *Ajouter le support pour faire de la vérification orthographique*
|
* [ep_spellcheck](https://www.npmjs.com/package/ep_spellcheck) - *Ajouter le support pour faire de la vérification orthographique*
|
||||||
* [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Ajouter la prise en charge de Subscript et Superscript*.
|
* [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Ajouter la prise en charge de Subscript et Superscript*.
|
||||||
* [ep_table_of_contents](https://www.npmjs.com/package/ep_table_of_contents) - *Voir une table des matières pour votre pad*
|
* [ep_table_of_contents](https://www.npmjs.com/package/ep_table_of_contents) - *Voir une table des matières pour votre pad*
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
main.pad_configuration.pad_config_chatandusers=1|0
|
main.pad_configuration.pad_config_chatandusers=1|0
|
||||||
main.pad_configuration.pad_config_alwaysshowchat=1|0
|
main.pad_configuration.pad_config_alwaysshowchat=1|0
|
||||||
main.pad_configuration.pad_config_show_markdown=1|0
|
main.pad_configuration.pad_config_show_markdown=1|0
|
||||||
main.pad_configuration.pad_config_pageview=1|0
|
|
||||||
main.pad_configuration.pad_config_automatic_logout=0|1
|
main.pad_configuration.pad_config_automatic_logout=0|1
|
||||||
main.pad_configuration.pad_config_skinname=noskin|colibris|noskin
|
main.pad_configuration.pad_config_skinname=noskin|colibris|noskin
|
||||||
main.mypads_configuration.mypads=0|1
|
main.mypads_configuration.mypads=0|1
|
||||||
|
@ -38,7 +37,6 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=1 (9001)
|
|
||||||
change_url=1
|
change_url=1
|
||||||
actions=1
|
actions=1
|
||||||
config_panel=1
|
config_panel=1
|
||||||
|
@ -71,7 +69,7 @@
|
||||||
useldap=0
|
useldap=0
|
||||||
; Checks
|
; Checks
|
||||||
setup_root=1
|
setup_root=1
|
||||||
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
|
upgrade=1 from_commit=978e77403a6d8e9512ec1f5203e9834e945c2d8c
|
||||||
;; Test sans export
|
;; Test sans export
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
|
@ -89,6 +87,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=change
|
Notification=change
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
|
; commit=978e77403a6d8e9512ec1f5203e9834e945c2d8c
|
||||||
name= Fix nodejs & global update
|
name= #113
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=password&language=en&is_public=1&abiword=0&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=password&language=en&is_public=1&abiword=0&
|
||||||
|
|
|
@ -211,10 +211,6 @@
|
||||||
// ep_markdown
|
// ep_markdown
|
||||||
"ep_markdown_default": false, // Setting as default
|
"ep_markdown_default": false, // Setting as default
|
||||||
|
|
||||||
// ep_page_view
|
|
||||||
"ep_page_view_default" : false, // Set page view as default
|
|
||||||
"ep_page_view_disable_change" : false, // Disable change of page view setting in UI
|
|
||||||
|
|
||||||
// Other plugins config
|
// Other plugins config
|
||||||
// ep_comments_page
|
// ep_comments_page
|
||||||
// Display comments as icons, not boxes
|
// Display comments as icons, not boxes
|
||||||
|
|
|
@ -42,11 +42,6 @@ name = "Etherpad configuration"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = false
|
default = false
|
||||||
|
|
||||||
[main.pad_configuration.pad_config_pageview]
|
|
||||||
ask = "Page view?"
|
|
||||||
type = "boolean"
|
|
||||||
default = false
|
|
||||||
|
|
||||||
[main.pad_configuration.pad_config_automatic_logout]
|
[main.pad_configuration.pad_config_automatic_logout]
|
||||||
ask = "Automatic logout"
|
ask = "Automatic logout"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Online editor providing collaborative editing in real-time.",
|
"en": "Online editor providing collaborative editing in real-time.",
|
||||||
"fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel."
|
"fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel."
|
||||||
},
|
},
|
||||||
"version": "1.8.4~ynh2",
|
"version": "1.8.4~ynh3",
|
||||||
"url": "https://framapad.org",
|
"url": "https://framapad.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
"fr": "Voulez-vous installer le plugin MyPads ?"
|
"fr": "Voulez-vous installer le plugin MyPads ?"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"en": "<a href=https://git.framasoft.org/framasoft/ep_mypads target=_blank>mypads plugin</a>"
|
"en": "<a href=https://git.framasoft.org/framasoft/ep_mypads target=_blank>MyPads plugin</a>"
|
||||||
},
|
},
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,20 +11,20 @@ nodejs_version=12
|
||||||
|
|
||||||
# MyPads version
|
# MyPads version
|
||||||
# This variable is mostly used to force an upgrade of the package in case of new versions of MyPads.
|
# This variable is mostly used to force an upgrade of the package in case of new versions of MyPads.
|
||||||
mypads_version=1.7.17
|
mypads_version=1.7.19
|
||||||
|
|
||||||
# Plugin versions
|
# Plugin versions
|
||||||
ep_align_version=0.2.5
|
ep_align_version=0.3.31
|
||||||
ep_author_hover_version=0.3.0
|
ep_author_hover_version=0.3.17
|
||||||
ep_automatic_logut_version=1.0.8
|
ep_automatic_logut_version=1.0.8
|
||||||
ep_comments_page_version=0.1.5
|
ep_comments_page_version=0.1.58
|
||||||
#ep_countable_version=0.0.7
|
ep_countable_version=0.0.9
|
||||||
ep_delete_empty_pads_version=0.0.6
|
ep_delete_empty_pads_version=0.0.7
|
||||||
ep_font_color_version=0.0.15
|
ep_font_color_version=0.0.40
|
||||||
ep_headings2_version=0.1.3
|
ep_headings2_version=0.2.26
|
||||||
ep_markdown_version=0.1.7
|
ep_markdown_version=0.1.30
|
||||||
ep_page_view_version=0.5.24
|
ep_page_view_version=0.5.24
|
||||||
ep_spellcheck_version=0.0.7
|
ep_spellcheck_version=0.0.25
|
||||||
ep_subscript_and_superscript_version=0.1.2
|
ep_subscript_and_superscript_version=0.2.22
|
||||||
ep_table_of_contents_version=0.2.3
|
ep_table_of_contents_version=0.3.18
|
||||||
ep_font_size_version=0.3.8
|
ep_font_size_version=0.4.19
|
||||||
|
|
|
@ -67,10 +67,6 @@ pad_config_alwaysshowchat="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYS
|
||||||
old_pad_config_show_markdown="$(get_config_value ep_markdown_default)"
|
old_pad_config_show_markdown="$(get_config_value ep_markdown_default)"
|
||||||
pad_config_show_markdown="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN:-$old_pad_config_show_markdown}"
|
pad_config_show_markdown="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN:-$old_pad_config_show_markdown}"
|
||||||
|
|
||||||
# Plugin option ep_page_view_default
|
|
||||||
old_pad_config_pageview="$(get_config_value ep_page_view_default)"
|
|
||||||
pad_config_pageview="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_PAGEVIEW:-$old_pad_config_pageview}"
|
|
||||||
|
|
||||||
# Enable/disable ep_automatic_logut
|
# Enable/disable ep_automatic_logut
|
||||||
if grep -q "//.*\"automatic_logut_" $config_file
|
if grep -q "//.*\"automatic_logut_" $config_file
|
||||||
then
|
then
|
||||||
|
@ -149,7 +145,6 @@ show_config() {
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_CHATANDUSERS=$pad_config_chatandusers"
|
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_CHATANDUSERS=$pad_config_chatandusers"
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYSSHOWCHAT=$pad_config_alwaysshowchat"
|
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYSSHOWCHAT=$pad_config_alwaysshowchat"
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN=$pad_config_show_markdown"
|
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN=$pad_config_show_markdown"
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_PAGEVIEW=$pad_config_pageview"
|
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_AUTOMATIC_LOGOUT=$pad_config_automatic_logout"
|
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_AUTOMATIC_LOGOUT=$pad_config_automatic_logout"
|
||||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SKINNAME=$pad_config_skinname"
|
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SKINNAME=$pad_config_skinname"
|
||||||
|
|
||||||
|
@ -217,14 +212,6 @@ apply_config() {
|
||||||
restart_etherpad=1
|
restart_etherpad=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Plugin option ep_page_view_default
|
|
||||||
if [ "$pad_config_pageview" != "$old_pad_config_pageview" ]
|
|
||||||
then
|
|
||||||
ynh_replace_string --match_string="\(\"ep_page_view_default\" *: \).*," --replace_string="\1$pad_config_pageview," --target_file="$config_file"
|
|
||||||
ynh_app_setting_set --app=$app --key=pad_config_pageview --value="$pad_config_pageview"
|
|
||||||
restart_etherpad=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Plugin option ep_automatic_logut
|
# Plugin option ep_automatic_logut
|
||||||
if [ "$pad_config_automatic_logout" != "$old_pad_config_automatic_logout" ]
|
if [ "$pad_config_automatic_logout" != "$old_pad_config_automatic_logout" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -65,7 +65,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=3
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|
||||||
ynh_print_OFF; ynh_app_setting_set --app=$app --key=password --value=$password; ynh_print_ON
|
ynh_print_OFF; ynh_app_setting_set --app=$app --key=password --value=$password; ynh_print_ON
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
ynh_app_setting_set --app=$app --key=export --value=$export
|
ynh_app_setting_set --app=$app --key=export --value=$export
|
||||||
|
@ -233,7 +232,7 @@ ynh_add_systemd_config
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add $app --log "/var/log/$app/etherpad.log"
|
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL FRAMAPAD'S PLUGINS
|
# INSTALL FRAMAPAD'S PLUGINS
|
||||||
|
@ -250,7 +249,7 @@ npm install ep_automatic_logut@${ep_automatic_logut_version} >> $install_log 2>&
|
||||||
# Framapad - Adds comments on sidebar and link it to the text.
|
# Framapad - Adds comments on sidebar and link it to the text.
|
||||||
npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1
|
npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1
|
||||||
# Framapad - Displays paragraphs, sentences, words and characters counts.
|
# Framapad - Displays paragraphs, sentences, words and characters counts.
|
||||||
#npm install ep_countable@${ep_countable_version} >> $install_log 2>&1
|
npm install ep_countable@${ep_countable_version} >> $install_log 2>&1
|
||||||
# Framapad - Delete pads which were never edited
|
# Framapad - Delete pads which were never edited
|
||||||
npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1
|
npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1
|
||||||
# Framapad - Apply colors to fonts
|
# Framapad - Apply colors to fonts
|
||||||
|
@ -263,8 +262,6 @@ if [ $mypads -eq 1 ]; then
|
||||||
# Framapad - Groups and private pads for etherpad
|
# Framapad - Groups and private pads for etherpad
|
||||||
npm install ep_mypads@${mypads_version} >> $install_log 2>&1
|
npm install ep_mypads@${mypads_version} >> $install_log 2>&1
|
||||||
fi
|
fi
|
||||||
# Framapad - Add support to do 'page view', with a toggle on/off option in Settings, also Page Breaks with Control Enter
|
|
||||||
npm install ep_page_view@${ep_page_view_version} >> $install_log 2>&1
|
|
||||||
# Framapad - Add support to do 'Spell checking'
|
# Framapad - Add support to do 'Spell checking'
|
||||||
npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1
|
npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1
|
||||||
# Framapad - Add support for Subscript and Superscript
|
# Framapad - Add support for Subscript and Superscript
|
||||||
|
@ -306,15 +303,15 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failrege
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..."
|
ynh_script_progression --message="Configuring permissions..." --weight=2
|
||||||
|
|
||||||
if [ $is_public -eq 1 ]; then
|
if [ $is_public -eq 1 ]; then
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
else
|
|
||||||
# etherpad admin page doesn't support SSO...
|
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/admin"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Etherpad admin page doesn't support SSO...
|
||||||
|
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -95,7 +95,7 @@ ynh_remove_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE FAIL2BAN CONFIGURATION
|
# REMOVE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing Fail2ban configuration..." --weight=7
|
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=7
|
||||||
|
|
||||||
# Remove the dedicated fail2ban config
|
# Remove the dedicated fail2ban config
|
||||||
ynh_remove_fail2ban_config
|
ynh_remove_fail2ban_config
|
||||||
|
|
|
@ -141,7 +141,7 @@ chown -R $app: $final_path
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add $app --log "/var/log/$app/etherpad.log"
|
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -23,7 +23,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
export=$(ynh_app_setting_get --app=$app --key=export)
|
export=$(ynh_app_setting_get --app=$app --key=export)
|
||||||
|
@ -57,15 +56,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
|
||||||
if [ "$is_public" = "Yes" ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
|
||||||
is_public=1
|
|
||||||
elif [ "$is_public" = "No" ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
|
||||||
is_public=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
# If db_name doesn't exist, create it
|
||||||
if [ -z "$db_name" ]; then
|
if [ -z "$db_name" ]; then
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
|
@ -135,6 +125,18 @@ if [ -z "$overwrite_systemd" ]; then
|
||||||
ynh_app_setting_set $app overwrite_systemd $overwrite_systemd
|
ynh_app_setting_set $app overwrite_systemd $overwrite_systemd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! ynh_permission_exists --permission="admin"; then
|
||||||
|
# Create the required permissions
|
||||||
|
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -362,7 +364,7 @@ chown $app -R /var/log/$app/etherpad.log
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add $app --log "/var/log/$app/etherpad.log"
|
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/etherpad.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE FAIL2BAN
|
# UPGRADE FAIL2BAN
|
||||||
|
@ -404,19 +406,6 @@ then
|
||||||
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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP SSOWAT
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading SSOwat configuration..."
|
|
||||||
|
|
||||||
# Make app public if necessary
|
|
||||||
if [ $is_public -eq 1 ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
|
||||||
else
|
|
||||||
# etherpad admin page doesn't support SSO...
|
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/admin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue