From 608ac57c3d6b2847098a7b71b219ca97a3503101 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 9 Apr 2021 23:48:21 +0200 Subject: [PATCH 1/7] Apply example_ynh --- README.md | 4 ++-- check_process | 11 +++++------ manifest.json | 10 +--------- scripts/backup | 2 +- scripts/change_url | 20 ++++++++++---------- scripts/install | 43 +++++++++++++++++++++---------------------- scripts/remove | 6 +++--- scripts/restore | 32 ++++++++++++++------------------ scripts/upgrade | 45 ++++++++++++++++++++++----------------------- 9 files changed, 79 insertions(+), 94 deletions(-) diff --git a/README.md b/README.md index aa2747c..83a50be 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ To configure this app: modify the file /var/www/peertube-search-index/config/pro #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/peertube-search-index%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/peertube-search-index%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/peertube-search-index/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/peertube-search-index.svg)](https://ci-apps-arm.yunohost.org/ci/apps/peertube-search-index/) ## Links diff --git a/check_process b/check_process index 933943a..1f38c46 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,3 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) @@ -19,10 +14,12 @@ upgrade=1 from_commit=b0541627859d2b702b55f7ac33e7f786e70b3051 # 0.0.1-2020-12-24~ynh1 upgrade=1 from_commit=103b86aa716d289cab00aee49e539cab252e21a3 + # 0.0.1-2021-02-17~ynh1 + upgrade=1 from_commit=e9864a6c794ba3ec5e6359b298d299f513a157e7 backup_restore=1 multi_instance=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Options Email= Notification=none @@ -31,3 +28,5 @@ Notification=none name=0.0.1-2020-10-31~ynh1 ; commit=103b86aa716d289cab00aee49e539cab252e21a3 name=0.0.1-2020-12-24~ynh1 + ; commit=e9864a6c794ba3ec5e6359b298d299f513a157e7 + name=0.0.1-2021-02-17~ynh1 diff --git a/manifest.json b/manifest.json index b5e034c..f271028 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A search engine for PeerTube videos and channels", "fr": "Un moteur de recherche de vidéos et chaînes PeerTube" }, - "version": "0.0.1-2021-02-17~ynh1", + "version": "0.0.1-2021-02-17~ynh2", "url": "https://search.joinpeertube.org/", "license": "AGPL-3.0-only", "maintainer": { @@ -24,19 +24,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for PeerTube search-index", - "fr": "Choisissez un nom de domaine pour PeerTube search-index" - }, "example": "example.com" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true } ] diff --git a/scripts/backup b/scripts/backup index b8c45c5..f78c623 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# 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/change_url b/scripts/change_url index 70b3eed..edc54d1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,9 +33,9 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -43,7 +43,7 @@ ynh_clean_setup () { # 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" - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script @@ -77,23 +77,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --li #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config "port" fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -122,7 +122,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index 4533550..0c9e914 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port # Optional: Expose this port publicly -# (N.B. : you only need to do this if the app actually needs to expose the port publicly. +# (N.B.: you only need to do this if the app actually needs to expose the port publicly. # If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !) #================================================= @@ -75,6 +75,14 @@ systemctl start elasticsearch.service ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -87,22 +95,18 @@ pushd "$final_path" git checkout $COMMIT --quiet popd +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R root:$app "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config "port" -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." - -# Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path - #================================================= # SPECIFIC SETUP #================================================= @@ -127,22 +131,17 @@ ynh_script_progression --message="Configuring a systemd service..." ynh_add_systemd_config --others_var="ynh_npm" #================================================= -# MODIFY A CONFIG FILE +# ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Modifying a config file..." +ynh_script_progression --message="Adding a config file..." ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" +chmod 400 "$final_path/some_config_file" +chown $app:$app "$final_path/some_config_file" + #================================================= # GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions to app files -chown -R $app: $final_path - #================================================= # SETUP LOGROTATE #================================================= @@ -182,7 +181,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 0adcebd..548ad77 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." @@ -60,9 +60,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 248f46c..ae6641b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# 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 @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -46,10 +46,18 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the nginx configuration..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -57,21 +65,9 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path - -#================================================= -# RESTORE USER RIGHTS -#================================================= -ynh_script_progression --message="Restoring user rights..." - -# Restore permissions on app files -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R root:$app "$final_path" #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 3f3a321..e7368af 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,14 +41,14 @@ if ynh_legacy_permissions_exists; then fi #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script @@ -63,6 +63,14 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped $app search index daemon" +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -79,12 +87,16 @@ then popd fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R root:$app "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config "port" #================================================= @@ -99,14 +111,6 @@ systemctl start elasticsearch.service ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path - #================================================= # SPECIFIC UPGRADE #================================================= @@ -130,22 +134,17 @@ ynh_script_progression --message="Upgrading systemd configuration..." ynh_add_systemd_config --others_var="ynh_npm" #================================================= -# MODIFY A CONFIG FILE +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." +ynh_script_progression --message="Updating a config file..." ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" +chmod 400 "$final_path/some_config_file" +chown $app:$app "$final_path/some_config_file" + #================================================= # GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions on app files -chown -R $app: $final_path - #================================================= # SETUP LOGROTATE #================================================= @@ -171,7 +170,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload From fafba24ff5aee2f17617c859af14b00897c3ce0c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 01:57:06 +0200 Subject: [PATCH 2/7] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 0c9e914..ff05ab1 100644 --- a/scripts/install +++ b/scripts/install @@ -137,8 +137,8 @@ ynh_script_progression --message="Adding a config file..." ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" -chmod 400 "$final_path/some_config_file" -chown $app:$app "$final_path/some_config_file" +chmod 400 "$final_path/config/production.yaml" +chown $app:$app "$final_path/config/production.yaml" #================================================= # GENERIC FINALIZATION From 5d082698d6227605f5d4ccc9fa3762d465069b2a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 01:57:11 +0200 Subject: [PATCH 3/7] Update upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e7368af..60d71a5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,8 +140,8 @@ ynh_script_progression --message="Updating a config file..." ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" -chmod 400 "$final_path/some_config_file" -chown $app:$app "$final_path/some_config_file" +chmod 400 "$final_path/config/production.yaml" +chown $app:$app "$final_path/config/production.yaml" #================================================= # GENERIC FINALIZATION From 5a51a75d141d347a55ce5c3f3efba8c59109d6e1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 19:17:43 +0200 Subject: [PATCH 4/7] Apply last example_ynh --- scripts/_common.sh | 3 ++- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2490276..2649474 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,11 +6,12 @@ # dependencies used by the app pkg_dependencies="git" + extra_pkg_dependencies="elasticsearch-oss" NODEJS_VERSION=12 -source="https://framagit.org/framasoft/peertube/search-index" +REPOSITORY="https://framagit.org/framasoft/peertube/search-index" COMMIT="c29e7f02df4bd5cdfac3696de6d221f1beea041f" diff --git a/scripts/install b/scripts/install index ff05ab1..61f6bea 100644 --- a/scripts/install +++ b/scripts/install @@ -90,7 +90,7 @@ ynh_script_progression --message="Setting up source files..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -git clone $source $final_path --quiet +git clone $REPOSITORY $final_path --quiet pushd "$final_path" git checkout $COMMIT --quiet popd diff --git a/scripts/upgrade b/scripts/upgrade index 60d71a5..03b8358 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,7 +41,7 @@ if ynh_legacy_permissions_exists; then fi #================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." From 24101fee71325c02d360761feb901164e341e1ce Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 11 Apr 2021 20:47:47 +0200 Subject: [PATCH 5/7] Fix rights --- scripts/install | 18 +++++++++--------- scripts/restore | 2 +- scripts/upgrade | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/install b/scripts/install index 61f6bea..dc0c65a 100644 --- a/scripts/install +++ b/scripts/install @@ -97,7 +97,7 @@ popd chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:$app "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION @@ -122,14 +122,6 @@ pushd "$final_path" $ynh_npm run build popd -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." - -# Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_npm" - #================================================= # ADD A CONFIGURATION #================================================= @@ -140,6 +132,14 @@ ynh_add_config --template="../conf/default.yaml" --destination="$final_path/conf chmod 400 "$final_path/config/production.yaml" chown $app:$app "$final_path/config/production.yaml" +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Configuring a systemd service..." + +# Create a dedicated systemd config +ynh_add_systemd_config --others_var="ynh_npm" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index ae6641b..b049c37 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,7 +67,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:$app "$final_path" +chown -R $app:$app "$final_path" #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 03b8358..90d48a9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,7 +89,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:$app "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION @@ -125,14 +125,6 @@ pushd "$final_path" $ynh_npm run build popd -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." - -# Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_npm" - #================================================= # UPDATE A CONFIG FILE #================================================= @@ -143,6 +135,14 @@ ynh_add_config --template="../conf/default.yaml" --destination="$final_path/conf chmod 400 "$final_path/config/production.yaml" chown $app:$app "$final_path/config/production.yaml" +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." + +# Create a dedicated systemd config +ynh_add_systemd_config --others_var="ynh_npm" + #================================================= # GENERIC FINALIZATION #================================================= From e31a068ff3b83cd8927ae1fd3ad0c9c71558493d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 15 Apr 2021 20:28:52 +0200 Subject: [PATCH 6/7] Fix chmod --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index dc0c65a..a16be47 100644 --- a/scripts/install +++ b/scripts/install @@ -95,7 +95,7 @@ pushd "$final_path" git checkout $COMMIT --quiet popd -chmod 750 "$final_path" +chmod -R 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" diff --git a/scripts/restore b/scripts/restore index b049c37..3044f85 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,7 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -chmod 750 "$final_path" +chmod -R 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 90d48a9..cbe94e6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ then popd fi -chmod 750 "$final_path" +chmod -R 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" From b7430f4503664da8ddd67b19de1b2dcc78e37731 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 17 Apr 2021 18:31:51 +0200 Subject: [PATCH 7/7] Fix recursive chmod --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index a16be47..dc0c65a 100644 --- a/scripts/install +++ b/scripts/install @@ -95,7 +95,7 @@ pushd "$final_path" git checkout $COMMIT --quiet popd -chmod -R 750 "$final_path" +chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" diff --git a/scripts/restore b/scripts/restore index 3044f85..b049c37 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,7 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -chmod -R 750 "$final_path" +chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index cbe94e6..90d48a9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ then popd fi -chmod -R 750 "$final_path" +chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path"