diff --git a/check_process b/check_process index 8ecac73..06fe0e2 100644 --- a/check_process +++ b/check_process @@ -16,9 +16,9 @@ setup_public=1 upgrade=1 # 7.0~ynh1 - # upgrade=1 from_commit=89bf310b8ac87a61e5974508f2b41fbb32823e95 + #upgrade=1 from_commit=89bf310b8ac87a61e5974508f2b41fbb32823e95 # 7.73~ynh1 - # upgrade=1 from_commit=6c565bad2d6083eac25eaee126d9eb32595d94b4 + #upgrade=1 from_commit=6c565bad2d6083eac25eaee126d9eb32595d94b4 # 7.78~ynh1 upgrade=1 from_commit=868272f6dfc0a0ccac75982b224628564f10123e backup_restore=1 diff --git a/scripts/restore b/scripts/restore index 4c4a581..3ee0a75 100644 --- a/scripts/restore +++ b/scripts/restore @@ -86,6 +86,12 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC RESTORATION +#================================================= +# RESTORE THE CRON FILE +#================================================= + +ynh_restore_file --origin_path="/etc/cron.d/$app" + #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -103,12 +109,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql -#================================================= -# RESTORE THE CRON FILE -#================================================= - -ynh_restore_file --origin_path="/etc/cron.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f2e83fa..96da6ff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,6 +93,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC UPGRADE +#================================================= +# SETUP THE CRON FILE +#================================================= +ynh_script_progression --message="Setuping the cron file" + +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" + #================================================= # UPGRADE COMPOSER #================================================= @@ -120,20 +127,11 @@ ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storing the config file checksum..." - -# Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/$app/sites/default/settings.php" -#================================================= -# SETUP THE CRON FILE -#================================================= -ynh_script_progression --message="Setuping the cron file" - -ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R root:$app "$final_path" #================================================= # GENERIC FINALIZATION