From 8162fc993fd033d771b48513d6bc3ae7b43de31c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 28 Mar 2022 22:49:19 +0200 Subject: [PATCH 1/4] Update upgrade --- scripts/upgrade | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f3b0fb1..fb21700 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -106,6 +106,21 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # SPECIFIC UPGRADE +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." + +ynh_add_config --template="../conf/client.config.js" --destination="$final_path/src/client/config.js" + +chmod 400 "$final_path/src/client/config.js" +chown $app:$app "$final_path/src/client/config.js" + +ynh_add_config --template="../conf/server.index.js" --destination="$final_path/src/server/index.js" + +chmod 400 "$final_path/src/server/index.js" +chown $app:$app "$final_path/src/server/index.js" + #================================================= # BUILD APP #================================================= From e8ad855fdc485ca207a0aae05eaf35dbad9bd34c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 29 Mar 2022 08:26:13 +0200 Subject: [PATCH 2/4] Fix upgrade --- scripts/install | 30 ------------------------------ scripts/upgrade | 4 ++++ 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/scripts/install b/scripts/install index 5c6c9ab..8a3082c 100644 --- a/scripts/install +++ b/scripts/install @@ -140,36 +140,6 @@ pushd $final_path npm install --save --production @osjs/pam-auth popd -#================================================= -# Add Authentication through Mysql Database -#================================================= - -#pushd $final_path - #$ynh_npm install --save --production @osjs/database-auth - #$ynh_npm install --save mysql - #$ynh_node osjs config:set --name=authenticator --value=database - #$ynh_node osjs config:set --name=server.modules.auth.database.driver --value=mysql - #$ynh_node osjs config:set --name=server.modules.auth.database.mysql.host --value=localhost - #$ynh_node osjs config:set --name=server.modules.auth.database.mysql.user --value=$db_name - #$ynh_node osjs config:set --name=server.modules.auth.database.mysql.password --value=$db_pwd - #$ynh_node osjs config:set --name=server.modules.auth.database.mysql.database --value=$db_name - #$ynh_node osjs config:set --name=client.ReloadOnShutdown --value=true -#popd - -#$ynh_node osjs build:config - -#================================================= -# Add the first user -#================================================= - -##$ynh_node bin/add-user.js add $admin_name admin -#$ynh_node bin/add-user.js pwd $admin_name <<< $admin_pass -#mkdir vfs/home/$admin_name - -#================================================= -# Configure init script -#================================================= - ynh_replace_string --match_string="8000" --replace_string="$port" --target_file="$final_path/src/server/config.js" chown -R $app:$app "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index fb21700..93e4685 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,6 +134,10 @@ pushd $final_path npm install --save --production @osjs/pam-auth popd +ynh_replace_string --match_string="8000" --replace_string="$port" --target_file="$final_path/src/server/config.js" + +chown -R $app:$app "$final_path" + #================================================= # SETUP SYSTEMD #================================================= From 65a148c048f79e557e3cc24657babd7a8d956085 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 29 Mar 2022 20:07:22 +0200 Subject: [PATCH 3/4] Upgrade version --- check_process | 3 ++- manifest.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index e4177c0..8e251ee 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,8 @@ setup_private=1 setup_public=1 upgrade=1 - "upgrade=1 from_commit=CommitHash + # 3.1.12~ynh1 + upgrade=1 from_commit=5b84e38190212d2f557c4d65d88f376e93e7d242 backup_restore=1 multi_instance=1 port_already_use=0 diff --git a/manifest.json b/manifest.json index 503fa7d..601f2ea 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Desktop you have accesss through your browser", "fr": "Bureau accessible à travers votre navigateur" }, - "version": "3.1.12~ynh1", + "version": "3.1.12~ynh2", "url": "https://www.os-js.org/", "upstream": { "license": "MIT", From f6a5e3af6aa3f8507f20133de0b3d391c15a90ca Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 29 Mar 2022 18:07:29 +0000 Subject: [PATCH 4/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 548cdc1..66ab964 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in [OS.js](https://www.os-js.org/) is an [open-source](https://raw.githubusercontent.com/os-js/OS.js/master/LICENSE) web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more. -**Shipped version:** 3.1.12~ynh1 +**Shipped version:** 3.1.12~ynh2 **Demo:** https://demo.os-js.org/ diff --git a/README_fr.md b/README_fr.md index 245ea6d..2bf0be3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour [OS.js](https://www.os-js.org/) is an [open-source](https://raw.githubusercontent.com/os-js/OS.js/master/LICENSE) web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more. -**Version incluse :** 3.1.12~ynh1 +**Version incluse :** 3.1.12~ynh2 **Démo :** https://demo.os-js.org/