mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Upgrade to 1.8.11
This commit is contained in:
parent
578e2fcd05
commit
5d01b660d2
11 changed files with 69 additions and 114 deletions
|
@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
||||||
Etherpad is a highly customizable Open Source online editor providing collaborative editing in really real-time.
|
Etherpad is a highly customizable Open Source online editor providing collaborative editing in really real-time.
|
||||||
This package will install the same plugins than [Framapad](https://framapad.org/).
|
This package will install the same plugins than [Framapad](https://framapad.org/).
|
||||||
|
|
||||||
**Shipped version:** 1.8.7
|
**Shipped version:** 1.8.11
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst
|
||||||
Etherpad est un éditeur en ligne Open Source hautement personnalisable qui permet l'édition collaborative en temps réel.
|
Etherpad est un éditeur en ligne Open Source hautement personnalisable qui permet l'édition collaborative en temps réel.
|
||||||
Ce paquet installera les mêmes plugins que [Framapad](https://framapad.org/).
|
Ce paquet installera les mêmes plugins que [Framapad](https://framapad.org/).
|
||||||
|
|
||||||
**Version embarquée :** 1.8.7
|
**Version embarquée :** 1.8.11
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.7.tar.gz
|
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.11.tar.gz
|
||||||
SOURCE_SUM=39212e8b2ab025643367664238279ba189104ddadf8f18db8feb02ceda538867
|
SOURCE_SUM=b9b9916d8e1b1ebe6dac5ebc0f24fa1ea064ddfd1307919bef2b58d7a8d5339c
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
ARCH_FORMAT=tar.gz
|
ARCH_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
"__ADMIN__": {
|
"__ADMIN__": {
|
||||||
// 1) "password" can be replaced with "hash" if you install ep_hash_auth
|
// 1) "password" can be replaced with "hash" if you install ep_hash_auth
|
||||||
// 2) please note that if password is null, the user will not be created
|
// 2) please note that if password is null, the user will not be created
|
||||||
"password": "__PASSWD__",
|
"password": "__PASSWORD__",
|
||||||
"is_admin": true
|
"is_admin": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,16 @@ location __PATH__/ {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
#sub_path_only rewrite ^__PATH__/admin$ __PATH__/admin/ permanent;
|
#sub_path_only rewrite ^__PATH__/admin$ __PATH__/admin/ permanent;
|
||||||
proxy_pass http://127.0.0.1:__PORT__/;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
more_set_headers "X-Frame-Options : ALLOWALL";
|
more_set_headers "X-Frame-Options : ALLOWALL";
|
||||||
|
|
||||||
# Recommended proxy_http version for keepalive connections
|
# Recommended proxy_http version for keepalive connections
|
||||||
# https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#nginx
|
# https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#nginx
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Etherpad-lite, the collaborative editor.
|
Description=Etherpad-lite, collaborative editing of documents in real-time.
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
Environment="PATH=__ENV_PATH__"
|
WorkingDirectory=__FINALPATH__
|
||||||
Environment=NODE_ENV=production
|
Environment="NODE_ENV=production"
|
||||||
ExecStart=__FINALPATH__/bin/safeRun.sh /var/log/__APP__/etherpad.log
|
Environment="__YNH_NODE_LOAD_PATH__"
|
||||||
|
ExecStart=__FINALPATH__/node_modules/ep_etherpad-lite/node/server.js
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -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.7~ynh1",
|
"version": "1.8.11~ynh1",
|
||||||
"url": "https://framapad.org",
|
"url": "https://framapad.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
"email": "maniackc_dev@crudelis.fr"
|
"email": "maniackc_dev@crudelis.fr"
|
||||||
}],
|
}],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.1"
|
"yunohost": ">= 4.1.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -11,13 +11,6 @@
|
||||||
- [ ] Upgrade from last version tested.
|
- [ ] Upgrade from last version tested.
|
||||||
- [ ] Can be reviewed and tested.
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
## Validation
|
## Package_check results
|
||||||
---
|
---
|
||||||
*Minor decision*
|
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*
|
||||||
- [ ] **Code review** :
|
|
||||||
- [ ] **Approval (LGTM)** :
|
|
||||||
*Code review and approval have to be from a member of @YunoHost-Apps/apps-group*
|
|
||||||
- **CI succeeded** :
|
|
||||||
[](https://ci-apps-hq.yunohost.org/jenkins/job/etherpad_mypads_ynh%20PR-NUM-/)
|
|
||||||
*Please replace '-NUM-' in this link by the PR number.*
|
|
||||||
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
|
||||||
|
|
|
@ -7,23 +7,24 @@ abiword_app_depencencies="abiword"
|
||||||
libreoffice_app_dependencies="unoconv libreoffice-writer"
|
libreoffice_app_dependencies="unoconv libreoffice-writer"
|
||||||
|
|
||||||
# NodeJS version
|
# NodeJS version
|
||||||
nodejs_version=12
|
nodejs_version=14
|
||||||
|
|
||||||
# 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.18
|
mypads_version=1.7.19
|
||||||
|
|
||||||
# Plugin versions
|
# Plugin versions
|
||||||
ep_align_version=0.3.14
|
ep_align_version=0.3.31
|
||||||
ep_author_hover_version=0.3.10
|
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.46
|
ep_comments_page_version=0.1.51
|
||||||
|
ep_countable_version=0.0.8
|
||||||
ep_delete_empty_pads_version=0.0.6
|
ep_delete_empty_pads_version=0.0.6
|
||||||
ep_font_color_version=0.0.30
|
ep_font_color_version=0.0.38
|
||||||
ep_font_size_version=0.4.8
|
ep_font_size_version=0.4.18
|
||||||
ep_headings2_version=0.2.11
|
ep_headings2_version=0.2.24
|
||||||
ep_markdown_version=0.1.16
|
ep_markdown_version=0.1.30
|
||||||
ep_page_view_version=0.5.26
|
ep_page_view_version=0.5.26
|
||||||
ep_spellcheck_version=0.0.18
|
ep_spellcheck_version=0.0.25
|
||||||
ep_subscript_and_superscript_version=0.2.11
|
ep_subscript_and_superscript_version=0.2.21
|
||||||
ep_table_of_contents_version=0.3.8
|
ep_table_of_contents_version=0.3.17
|
||||||
|
|
|
@ -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
|
||||||
|
@ -161,17 +160,12 @@ ynh_use_logrotate --specific_user=$app/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing Etherpad..." --weight=90
|
ynh_script_progression --message="Installing Etherpad..." --weight=90
|
||||||
|
|
||||||
# Install dependencies and proceed to the installation
|
chown -R $app: $final_path
|
||||||
ynh_use_nodejs
|
|
||||||
(
|
pushd $final_path
|
||||||
cd "$final_path"
|
ynh_use_nodejs
|
||||||
mkdir -p node_modules
|
ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh
|
||||||
cd node_modules
|
popd
|
||||||
[ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite
|
|
||||||
cd ep_etherpad-lite
|
|
||||||
chown -R $app: $final_path
|
|
||||||
ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --save --loglevel warn
|
|
||||||
)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE ETHERPAD
|
# CONFIGURE ETHERPAD
|
||||||
|
@ -184,7 +178,7 @@ ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_f
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$final_path/credentials.json"
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
|
||||||
ynh_print_OFF; ynh_replace_special_string --match_string="__PASSWD__" --replace_string="$password" --target_file="$final_path/credentials.json"; ynh_print_ON
|
ynh_print_OFF; ynh_replace_special_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json"; ynh_print_ON
|
||||||
if [ "$export" = "abiword" ]
|
if [ "$export" = "abiword" ]
|
||||||
then
|
then
|
||||||
# Get abiword binary path
|
# Get abiword binary path
|
||||||
|
@ -225,9 +219,7 @@ chmod 600 $final_path/credentials.json
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=4
|
ynh_script_progression --message="Configuring a systemd service..." --weight=4
|
||||||
|
|
||||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_add_systemd_config
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
|
@ -250,7 +242,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
|
||||||
|
@ -306,15 +298,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..."
|
||||||
|
|
||||||
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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,11 +23,11 @@ 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)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
mypads=$(ynh_app_setting_get --app=$app --key=mypads)
|
mypads=$(ynh_app_setting_get --app=$app --key=mypads)
|
||||||
useldap=$(ynh_app_setting_get --app=$app --key=useldap)
|
useldap=$(ynh_app_setting_get --app=$app --key=useldap)
|
||||||
overwrite_settings=$(ynh_app_setting_get --app=$app --key=overwrite_settings)
|
overwrite_settings=$(ynh_app_setting_get --app=$app --key=overwrite_settings)
|
||||||
|
@ -135,6 +135,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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -207,13 +219,6 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading NodeJS..." --weight=4
|
ynh_script_progression --message="Upgrading NodeJS..." --weight=4
|
||||||
|
|
||||||
# Remove the old nvm helper.
|
|
||||||
if [ -d /opt/nvm ]
|
|
||||||
then
|
|
||||||
ynh_secure_remove --file="/opt/nvm"
|
|
||||||
sed --in-place "/NVM_DIR/d" /root/.bashrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -221,36 +226,14 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Etherpad npm modules..." --weight=60
|
ynh_script_progression --message="Upgrading Etherpad npm modules..." --weight=60
|
||||||
|
|
||||||
# Update the main modules of etherpad
|
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
(cd "$final_path/src"
|
|
||||||
ynh_exec_warn_less npm cache clean --force
|
|
||||||
# Remove package-lock.json to prevent any shit during npm update...
|
|
||||||
#ynh_secure_remove --file="$final_path/src/package-lock.json"
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" update)
|
|
||||||
|
|
||||||
# Then update the additionnal modules
|
pushd $final_path
|
||||||
(cd "$final_path"
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less npm cache clean --force
|
ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh
|
||||||
while read node_module
|
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
|
||||||
do
|
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade
|
||||||
# Ignore ep_etherpad-lite, this part is updated before in this script.
|
popd
|
||||||
if [ "$node_module" = "ep_etherpad-lite" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo "Update $node_module"
|
|
||||||
# Build the name of the variable with the version.
|
|
||||||
module_version=${node_module}_version
|
|
||||||
# Get the content of the variable (from the file _variables)
|
|
||||||
module_version=${!module_version:-}
|
|
||||||
# If the module has no version stored in a variable into the file, keep it empty.
|
|
||||||
# That way, the upgrade will not be specific to a version.
|
|
||||||
## Otherwise, add @ before the version number to force the upgrade to this version.
|
|
||||||
if [ -n "${module_version}" ]; then
|
|
||||||
module_version=@${module_version}
|
|
||||||
fi
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --upgrade ${node_module}${module_version} || true
|
|
||||||
done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")")
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
@ -291,7 +274,7 @@ then
|
||||||
fi
|
fi
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json"
|
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json"
|
||||||
|
|
||||||
# Use ldap for mypads
|
# Use LDAP for MyPads
|
||||||
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string="//noldap" --replace_string="" --target_file="$final_path/settings.json"
|
ynh_replace_string --match_string="//noldap" --replace_string="" --target_file="$final_path/settings.json"
|
||||||
|
@ -329,11 +312,10 @@ then
|
||||||
cp ../conf/credentials.json "$final_path/credentials.json"
|
cp ../conf/credentials.json "$final_path/credentials.json"
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$app" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__DB_USER__" --replace_string="$app" --target_file="$final_path/credentials.json"
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|
||||||
ynh_print_OFF; password=$(ynh_app_setting_get --app=$app --key=password); ynh_print_ON
|
ynh_print_OFF; password=$(ynh_app_setting_get --app=$app --key=password); ynh_print_ON
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json"
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
|
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json"
|
||||||
ynh_print_OFF; ynh_replace_special_string --match_string="__PASSWD__" --replace_string="$password" --target_file="$final_path/credentials.json"; ynh_print_ON
|
ynh_print_OFF; ynh_replace_special_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json"; ynh_print_ON
|
||||||
|
|
||||||
# Recalculate and store the checksum of the file for the next upgrade.
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
ynh_store_file_checksum --file="$final_path/credentials.json"
|
ynh_store_file_checksum --file="$final_path/credentials.json"
|
||||||
|
@ -388,8 +370,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
||||||
# Overwrite the systemd configuration only if it's allowed
|
# Overwrite the systemd configuration only if it's allowed
|
||||||
if [ $overwrite_systemd -eq 1 ]
|
if [ $overwrite_systemd -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
|
||||||
ynh_add_systemd_config
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -404,19 +385,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