diff --git a/manifest.toml b/manifest.toml index 1bb07cf..0d08bef 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ admindoc = "https://joplinapp.org/help/" code = "https://github.com/laurent22/joplin/" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index 256e9a8..28ab8fc 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 3784ea1..97a4b67 100755 --- a/scripts/install +++ b/scripts/install @@ -16,29 +16,22 @@ ynh_app_setting_set --key=admin_mail --value=$admin_mail #================================================= ynh_script_progression "Installing dependencies..." -# Install Nodejs ynh_nodejs_install -#================================================= -# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated NGINX config using the conf/nginx.conf template ynh_config_add_nginx -# Create a dedicated systemd config ynh_config_add_systemd yunohost service add $app --description="Note-taking appliction" --log="/var/log/$app/$app.log" @@ -52,19 +45,15 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template=".env" --destination="$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env" - #================================================= # INSTALL JOPLIN #================================================= ynh_script_progression "Building $app..." pushd $install_dir/packages/server - - ynh_hide_warnings ynh_exec_as_app node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds - ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn build - ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn cache clean + ynh_hide_warnings ynh_exec_as_app BUILD_SEQUENCIAL=1 yarn install --inline-builds + ynh_hide_warnings ynh_exec_as_app yarn build + ynh_hide_warnings ynh_exec_as_app yarn cache clean ynh_safe_rm .yarn/berry popd @@ -73,7 +62,6 @@ popd #================================================= ynh_script_progression "Starting $app's systemd service..." -# Start a systemd service ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Starting services..." #================================================= diff --git a/scripts/restore b/scripts/restore index 02d4dfe..ffad4a7 100755 --- a/scripts/restore +++ b/scripts/restore @@ -11,7 +11,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PostgreSQL DATABASE #================================================= @@ -32,8 +31,6 @@ ynh_nodejs_install #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" @@ -48,7 +45,6 @@ yunohost service add $app --description="Note-taking appliction" --log="/var/log #================================================= ynh_script_progression "Reloading NGINX web server and $app's service..." -# Typically you only have either $app or php-fpm but not both at the same time... ynh_systemctl --service=$app --action="start" --log_path="systemd" ynh_systemctl --service=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7053fcf..a9a788b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,16 +17,13 @@ ynh_systemctl --service=$app --action="stop" --log_path="systemd" #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" --keep=".env" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # UPGRADE DEPENDENCIES #================================================= ynh_script_progression "Upgrading dependencies..." -# Install Nodejs ynh_nodejs_install #================================================= @@ -35,10 +32,9 @@ ynh_nodejs_install ynh_script_progression "Building $app..." pushd $install_dir/packages/server - - ynh_hide_warnings ynh_exec_as_app node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds - ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn build - ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn cache clean + ynh_hide_warnings ynh_exec_as_app BUILD_SEQUENCIAL=1 yarn install --inline-builds + ynh_hide_warnings ynh_exec_as_app yarn build + ynh_hide_warnings ynh_exec_as_app yarn cache clean ynh_safe_rm .yarn/berry popd @@ -62,9 +58,6 @@ ynh_script_progression "Updating configuration..." ynh_config_add --template=".env" --destination="$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env" - #================================================= # START SYSTEMD SERVICE #=================================================