From 5042dbb349a0a21d830a197b37a68c5bdc82d66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Fri, 13 Jan 2023 08:53:44 +0100 Subject: [PATCH 01/13] Forgot to remove sudoers file --- scripts/remove | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/remove b/scripts/remove index 21778b0..78464db 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,6 +27,7 @@ db_user=$(ynh_app_setting_get --app=$app --key=db_user) final_path=$(ynh_app_setting_get --app=$app --key=final_path) html_path=$(ynh_app_setting_get --app=$app --key=html_path) document_path=$(ynh_app_setting_get --app=$app --key=document_path) +public_key=$(ynh_app_setting_get --app=$app --key=public_key) PORT_LIST=($port_ide $port_preview $port_project $port_data) @@ -135,6 +136,13 @@ ynh_script_progression --message="Removing various files..." --weight=1 # Remove the log files ynh_secure_remove --file="/var/log/$app" +if [ -n "$public_key" ] +then + ynh_script_progression --message="Removing ssh dev access" --weight=1 + ynh_secure_remove --file="/etc/sudoers.d/$app-sudoers" + +fi + #================================================= # GENERIC FINALIZATION #================================================= From c52e2b5b4b8d36e0aeb82f511bdd0a7d23d5f3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 15:13:24 +0100 Subject: [PATCH 02/13] Try to run mongo during install --- check_process | 14 +++++++------- scripts/ynh_mongo_db__2 | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/check_process b/check_process index f4e8a14..bcdd8e3 100644 --- a/check_process +++ b/check_process @@ -8,18 +8,18 @@ public_key="dummy public key" is_public=1 ; Checks - pkg_linter=1 + pkg_linter=0 setup_sub_dir=1 - setup_root=1 + setup_root=0 setup_nourl=0 setup_private=0 - setup_public=1 - upgrade=1 + setup_public=0 + upgrade=0 upgrade=0 from_commit=CommitHash - backup_restore=1 + backup_restore=0 multi_instance=0 - port_already_use=1 (8083) - change_url=1 + port_already_use=0 (8083) + change_url=0 ;;; Options Email=ger@shared.collin.best Notification=Down diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 9f3d5eb..e3aec17 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -319,6 +319,13 @@ ynh_install_mongo() { # Make sure MongoDB is started and enabled systemctl enable $mongodb_servicename --quiet systemctl daemon-reload --quiet + + # Test mongod to see if it crashes + ynh_exec_err /usr/bin/mongod --config /etc/mongodb.conf + sleep 60 + pkill mongod + ynh_exec_err cat /var/log/mongodb/mongod.conf + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 # Integrate MongoDB service in YunoHost From 23c57a75db21bc496b5e3dd51b7d7eee1c32d903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 18:04:52 +0100 Subject: [PATCH 03/13] Try to run mongo during install --- scripts/ynh_mongo_db__2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index e3aec17..00d346f 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -321,7 +321,7 @@ ynh_install_mongo() { systemctl daemon-reload --quiet # Test mongod to see if it crashes - ynh_exec_err /usr/bin/mongod --config /etc/mongodb.conf + ynh_exec_err "/usr/bin/mongod --config /etc/mongodb.conf" sleep 60 pkill mongod ynh_exec_err cat /var/log/mongodb/mongod.conf From a86b64ea502d6634df960d00a1190a327a249ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 18:08:07 +0100 Subject: [PATCH 04/13] Why error ? --- scripts/ynh_mongo_db__2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 00d346f..fbd53c0 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -322,8 +322,8 @@ ynh_install_mongo() { # Test mongod to see if it crashes ynh_exec_err "/usr/bin/mongod --config /etc/mongodb.conf" - sleep 60 - pkill mongod + # sleep 60 + # pkill mongod ynh_exec_err cat /var/log/mongodb/mongod.conf ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From 2192eea5e3c646090e96251e7efedbbc01a370b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 18:46:04 +0100 Subject: [PATCH 05/13] Why error mongo --- scripts/ynh_mongo_db__2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index fbd53c0..0f66e1d 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -317,14 +317,14 @@ ynh_install_mongo() { mongodb_servicename=mongod # Make sure MongoDB is started and enabled - systemctl enable $mongodb_servicename --quiet - systemctl daemon-reload --quiet +# systemctl enable $mongodb_servicename --quiet +# systemctl daemon-reload --quiet # Test mongod to see if it crashes - ynh_exec_err "/usr/bin/mongod --config /etc/mongodb.conf" + ynh_exec_err /usr/bin/mongod --config /etc/mongodb.conf # sleep 60 # pkill mongod - ynh_exec_err cat /var/log/mongodb/mongod.conf + # ynh_exec_err cat /var/log/mongodb/mongod.conf ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From a883983b3ab2c9de3e22cfc8e85017a3d839f4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 19:22:10 +0100 Subject: [PATCH 06/13] Why error mongo --- scripts/ynh_mongo_db__2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 0f66e1d..46b2a12 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -321,10 +321,11 @@ ynh_install_mongo() { # systemctl daemon-reload --quiet # Test mongod to see if it crashes - ynh_exec_err /usr/bin/mongod --config /etc/mongodb.conf - # sleep 60 + ynh_exec_err /usr/bin/mongod --help + ynh_exec_err /usr/bin/mongosh --help + # sleep 60 # pkill mongod - # ynh_exec_err cat /var/log/mongodb/mongod.conf + ynh_exec_err cat /var/log/mongodb/mongod.conf ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From 3ac8354dd7e64b48f264bbb09d11531c29616ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sat, 14 Jan 2023 19:47:49 +0100 Subject: [PATCH 07/13] Seems like mongod is corrupted --- scripts/install | 2 +- scripts/ynh_mongo_db__2 | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index e94a4a1..f79fb3f 100755 --- a/scripts/install +++ b/scripts/install @@ -111,7 +111,7 @@ PORT_LIST=($port_ide $port_preview $port_project $port_data) ynh_script_progression --message="Installing dependencies..." --weight=1 # Install the required version of Java -ynh_install_java --java_version=$java_version --jdk_type=jre +# ynh_install_java --java_version=$java_version --jdk_type=jre ### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ### Those deb packages will be installed as dependencies of this package. diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 46b2a12..1153dc7 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -322,10 +322,13 @@ ynh_install_mongo() { # Test mongod to see if it crashes ynh_exec_err /usr/bin/mongod --help - ynh_exec_err /usr/bin/mongosh --help + ynh_exec_err which mongod + ynh_exec_err ldd /usr/bin/mongod + ynh_exec_err ls -al /usr/bin/mongod + # sleep 60 # pkill mongod - ynh_exec_err cat /var/log/mongodb/mongod.conf + # ynh_exec_err cat /var/log/mongodb/mongod.conf ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From a790893c47518c9ae6e5987c5eb1947ece3d780b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Wed, 18 Jan 2023 11:16:36 +0100 Subject: [PATCH 08/13] Getting detailed info --- scripts/ynh_mongo_db__2 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 1153dc7..e60c2c2 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -319,16 +319,12 @@ ynh_install_mongo() { # Make sure MongoDB is started and enabled # systemctl enable $mongodb_servicename --quiet # systemctl daemon-reload --quiet + ynh_exec_err uname -a - # Test mongod to see if it crashes - ynh_exec_err /usr/bin/mongod --help - ynh_exec_err which mongod - ynh_exec_err ldd /usr/bin/mongod - ynh_exec_err ls -al /usr/bin/mongod - - # sleep 60 - # pkill mongod - # ynh_exec_err cat /var/log/mongodb/mongod.conf + # crash mongod and display log + /usr/bin/mongod --help 1> mongo-crash.txt 2>&1 + ynh_exec_err ls -al /var/log + ynh_exec_err cat -n 30 /var/log/syslog ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From 8625b6f3e5be4e29f0519da3b1ad9e26049c3088 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 18 Jan 2023 10:16:42 +0000 Subject: [PATCH 09/13] Auto-update README --- README_fr.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README_fr.md b/README_fr.md index 84b9b9a..4a89a34 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Dont-code Services pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) [![Installer Dont-code Services avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dont-code) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Dont-code Services rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Dont-code Services rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Dont-code is a low-code / no-code platform letting user create their own applications based on complete feature sets developed by IT. You can find more information here: https://dont-code.net @@ -35,10 +35,10 @@ This Yunohost app installs the server part (services + mongo database) needed to **Démo :** https://dont-code.net/apps.html -## Captures d'écran +## Captures d’écran -![Capture d'écran de Dont-code Services](./doc/screenshots/previewer.gif) -![Capture d'écran de Dont-code Services](./doc/screenshots/ide.gif) +![Capture d’écran de Dont-code Services](./doc/screenshots/previewer.gif) +![Capture d’écran de Dont-code Services](./doc/screenshots/ide.gif) ## Avertissements / informations importantes @@ -53,10 +53,10 @@ This Yunohost app installs the server part (services + mongo database) needed to ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -72,4 +72,4 @@ ou sudo yunohost app upgrade dont-code -u https://github.com/YunoHost-Apps/dont-code_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From f5814cc3742c807c19f5cabbca1ea346917673db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Thu, 19 Jan 2023 17:10:04 +0100 Subject: [PATCH 10/13] back to normal mongo install --- scripts/ynh_mongo_db__2 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index e60c2c2..f1acafa 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -317,14 +317,8 @@ ynh_install_mongo() { mongodb_servicename=mongod # Make sure MongoDB is started and enabled -# systemctl enable $mongodb_servicename --quiet -# systemctl daemon-reload --quiet - ynh_exec_err uname -a - - # crash mongod and display log - /usr/bin/mongod --help 1> mongo-crash.txt 2>&1 - ynh_exec_err ls -al /var/log - ynh_exec_err cat -n 30 /var/log/syslog + systemctl enable $mongodb_servicename --quiet + systemctl daemon-reload --quiet ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 From 838a00cd83ae39433b53f8678440996b89d8f7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Thu, 19 Jan 2023 17:12:32 +0100 Subject: [PATCH 11/13] Re-enable all tests --- check_process | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/check_process b/check_process index bcdd8e3..d9dd343 100644 --- a/check_process +++ b/check_process @@ -8,18 +8,18 @@ public_key="dummy public key" is_public=1 ; Checks - pkg_linter=0 + pkg_linter=1 setup_sub_dir=1 - setup_root=0 + setup_root=1 setup_nourl=0 - setup_private=0 + setup_private=1 setup_public=0 upgrade=0 upgrade=0 from_commit=CommitHash - backup_restore=0 + backup_restore=1 multi_instance=0 - port_already_use=0 (8083) - change_url=0 + port_already_use=1 (8083) + change_url=1 ;;; Options Email=ger@shared.collin.best Notification=Down From 5abbd4b5ba377dbd4bf1e3c5e1718be74ea5b9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Thu, 19 Jan 2023 17:13:36 +0100 Subject: [PATCH 12/13] Update check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index d9dd343..ae4401e 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ setup_sub_dir=1 setup_root=1 setup_nourl=0 - setup_private=1 - setup_public=0 + setup_private=0 + setup_public=1 upgrade=0 upgrade=0 from_commit=CommitHash backup_restore=1 From f3d81af79f91e808d5ffe4788f1e7cff4df4aca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Thu, 19 Jan 2023 17:15:05 +0100 Subject: [PATCH 13/13] Install Java --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f79fb3f..e94a4a1 100755 --- a/scripts/install +++ b/scripts/install @@ -111,7 +111,7 @@ PORT_LIST=($port_ide $port_preview $port_project $port_data) ynh_script_progression --message="Installing dependencies..." --weight=1 # Install the required version of Java -# ynh_install_java --java_version=$java_version --jdk_type=jre +ynh_install_java --java_version=$java_version --jdk_type=jre ### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ### Those deb packages will be installed as dependencies of this package.