diff --git a/README.md b/README.md
index b1cb0a1..935053e 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ NocoDB has its own authentication system which does not rely on YunoHost's SSO o
## Documentation and resources
-* Official app website:
+* Official app website:
* Upstream app code repository:
* YunoHost documentation for this app:
* Report a bug:
diff --git a/README_fr.md b/README_fr.md
index aa55fc8..7547e7a 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -43,7 +43,7 @@ NocoDB has its own authentication system which does not rely on YunoHost's SSO o
## Documentations et ressources
-* Site officiel de l'app :
+* Site officiel de l'app :
* Dépôt de code officiel de l'app :
* Documentation YunoHost pour cette app :
* Signaler un bug :
diff --git a/check_process b/check_process
index ada3dc1..024f7b5 100644
--- a/check_process
+++ b/check_process
@@ -1,10 +1,6 @@
-# See here for more information
-# https://github.com/YunoHost/package_check#syntax-check_process-file
-
;; Test complet
; Manifest
domain="domain.tld"
- path="/"
is_public=1
; Checks
pkg_linter=1
@@ -16,14 +12,9 @@
upgrade=1
#upgrade=1 from_commit=CommitHash
backup_restore=1
- multi_instance=1
+ multi_instance=0
port_already_use=0
change_url=1
;;; Options
Email=
Notification=none
-;;; Upgrade options
- ; commit=CommitHash
- name=Name and date of the commit.
- manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
-
diff --git a/conf/app.src b/conf/app.src
index 64a1e25..e00b615 100644
--- a/conf/app.src
+++ b/conf/app.src
@@ -2,5 +2,6 @@ SOURCE_URL=https://github.com/nocodb/nocodb-seed/archive/8400c313906da8293014fd5
SOURCE_SUM=9307888a5e21cb220280ca688bde6f71fafae4c3738df72e88a990d52c3c5544
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
-SOURCE_EXTRACT=true
SOURCE_IN_SUBDIR=true
+SOURCE_FILENAME=
+SOURCE_EXTRACT=true
diff --git a/manifest.json b/manifest.json
index 700b2f0..6753ae8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -7,10 +7,10 @@
"fr": "Plateform sans code qui transforme toute base de données en un tableur intelligent."
},
"version": "0.90.11~ynh1",
- "url": "https://www.nocodb.com/",
+ "url": "https://www.nocodb.com",
"upstream": {
"license": "AGPL-3.0-only",
- "website": "https://www.nocodb.com/",
+ "website": "https://www.nocodb.com",
"demo": "https://www.nocodb.com/demos",
"code": "https://github.com/nocodb/nocodb"
},
@@ -20,9 +20,9 @@
"email": "tituspijean@outlook.com"
},
"requirements": {
- "yunohost": ">= 4.3"
+ "yunohost": ">= 4.3.0"
},
- "multi_instance": true,
+ "multi_instance": false,
"services": [
"nginx",
"php7.3-fpm",
diff --git a/scripts/_common.sh b/scripts/_common.sh
index b818f0f..44d7f52 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -4,6 +4,7 @@
# COMMON VARIABLES
#=================================================
+# dependencies used by the app
nodejs_version=16
#=================================================
diff --git a/scripts/backup b/scripts/backup
index ca47243..00469b9 100755
--- a/scripts/backup
+++ b/scripts/backup
@@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_clean_setup () {
- ### Remove this function if there's nothing to clean before calling the remove script.
true
}
# Exit if an error occurs during the execution of the script
diff --git a/scripts/change_url b/scripts/change_url
index 901acdb..6d59ec1 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -17,14 +17,10 @@ old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH
new_domain=$YNH_APP_NEW_DOMAIN
-new_path=$YNH_APP_NEW_PATH
+new_path="/"
app=$YNH_APP_INSTANCE_NAME
-if [ $new_path != "/" ]; then
- ynh_die --message="The app can only be installed at the root of a domain."
-fi
-
#=================================================
# LOAD SETTINGS
#=================================================
@@ -41,6 +37,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
+ ynh_clean_check_starting
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
@@ -117,7 +114,8 @@ fi
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
-ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+# Start a systemd service
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:"
#=================================================
# RELOAD NGINX
diff --git a/scripts/install b/scripts/install
index 5c3ab41..9964748 100755
--- a/scripts/install
+++ b/scripts/install
@@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
+ynh_clean_setup () {
+ ynh_clean_check_starting
+}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
@@ -21,11 +24,13 @@ ynh_abort_if_errors
#=================================================
domain=$YNH_APP_ARG_DOMAIN
-path_url="/" #$YNH_APP_ARG_PATH
+path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME
+jwt_secret=$(ynh_string_random --length=20)
+
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
@@ -50,6 +55,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
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=jwt_secret --value=$jwt_secret
#=================================================
# STANDARD MODIFICATIONS
@@ -117,7 +123,6 @@ ynh_script_progression --message="Installing NocoDB..." --weight=5
ynh_use_nodejs
pushd $final_path
-
if [ $YNH_ARCH = "arm64" ]; then
ynh_print_info --message="Retrieving and building OracleDB for ARM64..."
ynh_exec_warn_less ynh_exec_as $app git clone --recursive https://github.com/oracle/node-oracledb.git oracledb
@@ -136,9 +141,6 @@ popd
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
-jwt_secret=$(ynh_string_random --length=20)
-ynh_app_setting_set --app=$app --key=jwt_secret --value=$jwt_secret
-
ynh_add_config --template="env" --destination="$final_path/.env"
chmod 400 "$final_path/.env"
@@ -175,7 +177,7 @@ yunohost service add $app --description="$app daemon, turns any database into a
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
-ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:"
#=================================================
# SETUP SSOWAT
diff --git a/scripts/remove b/scripts/remove
index 2c5078e..8559b21 100755
--- a/scripts/remove
+++ b/scripts/remove
@@ -43,6 +43,14 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
+#=================================================
+# REMOVE LOGROTATE CONFIGURATION
+#=================================================
+ynh_script_progression --message="Removing logrotate configuration..." --weight=1
+
+# Remove the app-specific logrotate config
+ynh_remove_logrotate
+
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================
@@ -51,13 +59,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
-#=================================================
-# REMOVE DEPENDENCIES
-#=================================================
-ynh_script_progression --message="Removing dependencies..." --weight=1
-
-ynh_remove_nodejs
-
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@@ -75,12 +76,11 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
ynh_remove_nginx_config
#=================================================
-# REMOVE LOGROTATE CONFIGURATION
+# REMOVE DEPENDENCIES
#=================================================
-ynh_script_progression --message="Removing logrotate configuration..." --weight=1
+ynh_script_progression --message="Removing dependencies..." --weight=1
-# Remove the app-specific logrotate config
-ynh_remove_logrotate
+ynh_remove_nodejs
#=================================================
# SPECIFIC REMOVE
diff --git a/scripts/restore b/scripts/restore
index 3055ae1..0af2d78 100755
--- a/scripts/restore
+++ b/scripts/restore
@@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_clean_setup () {
- #### Remove this function if there's nothing to clean before calling the remove script.
- true
+ ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
@@ -33,7 +32,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
-nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@@ -45,13 +43,6 @@ test ! -d $final_path \
#=================================================
# STANDARD RESTORATION STEPS
-#=================================================
-# RESTORE THE NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
-
-ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
-
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
@@ -80,6 +71,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=2
ynh_install_nodejs --nodejs_version=$nodejs_version
+#=================================================
+# RESTORE THE NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
+
+ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
@@ -108,6 +106,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
+#=================================================
+# RESTORE THE LOGROTATE CONFIGURATION
+#=================================================
+ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
+
+ynh_restore_file --origin_path="/etc/logrotate.d/$app"
+
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
@@ -120,19 +125,12 @@ yunohost service add $app --description="$app daemon, turns any database into a
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
-ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
-
-#=================================================
-# RESTORE THE LOGROTATE CONFIGURATION
-#=================================================
-ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
-
-ynh_restore_file --origin_path="/etc/logrotate.d/$app"
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:"
#=================================================
# GENERIC FINALIZATION
#=================================================
-# RELOAD NGINX AND PHP-FPM
+# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
diff --git a/scripts/upgrade b/scripts/upgrade
index f11ea44..ec06d50 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -25,6 +25,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# CHECK VERSION
#=================================================
+ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
@@ -36,6 +37,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
+ ynh_clean_check_starting
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
@@ -54,7 +56,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
-#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
+ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#=================================================
# CREATE DEDICATED USER
@@ -80,14 +82,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
-
-# Create a dedicated NGINX config
-ynh_add_nginx_config
-
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@@ -98,6 +92,14 @@ if [ $nodejs_version != $(ynh_app_setting_get --app=$app --key=nodejs_version) ]
ynh_install_nodejs --nodejs_version=$nodejs_version
fi
+#=================================================
+# NGINX CONFIGURATION
+#=================================================
+ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
+
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
#=================================================
# SPECIFIC UPGRADE
#=================================================
@@ -149,7 +151,7 @@ yunohost service add $app --description="$app daemon, turns any database into a
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
-ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
+ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:"
#=================================================
# RELOAD NGINX
diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore
deleted file mode 100644
index 783a4ae..0000000
--- a/sources/extra_files/app/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*~
-*.sw[op]
diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore
deleted file mode 100644
index 783a4ae..0000000
--- a/sources/patches/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*~
-*.sw[op]