1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/drupal7_ynh.git synced 2024-09-03 18:26:19 +02:00

apply example_ynh

This commit is contained in:
yalh76 2021-04-10 23:22:06 +02:00
parent fc3d8de65e
commit dc6c138d05
3 changed files with 18 additions and 20 deletions

View file

@ -16,9 +16,9 @@
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 7.0~ynh1 # 7.0~ynh1
# upgrade=1 from_commit=89bf310b8ac87a61e5974508f2b41fbb32823e95 #upgrade=1 from_commit=89bf310b8ac87a61e5974508f2b41fbb32823e95
# 7.73~ynh1 # 7.73~ynh1
# upgrade=1 from_commit=6c565bad2d6083eac25eaee126d9eb32595d94b4 #upgrade=1 from_commit=6c565bad2d6083eac25eaee126d9eb32595d94b4
# 7.78~ynh1 # 7.78~ynh1
upgrade=1 from_commit=868272f6dfc0a0ccac75982b224628564f10123e upgrade=1 from_commit=868272f6dfc0a0ccac75982b224628564f10123e
backup_restore=1 backup_restore=1

View file

@ -86,6 +86,12 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
#=================================================
# RESTORE THE CRON FILE
#=================================================
ynh_restore_file --origin_path="/etc/cron.d/$app"
#================================================= #=================================================
# REINSTALL DEPENDENCIES # 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_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 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 # GENERIC FINALIZATION
#================================================= #=================================================

View file

@ -93,6 +93,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# SPECIFIC UPGRADE # 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 # 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} 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" ynh_store_file_checksum --file="$final_path/$app/sites/default/settings.php"
#================================================= chmod 750 "$final_path"
# SETUP THE CRON FILE chmod -R o-rwx "$final_path"
#================================================= chown -R root:$app "$final_path"
ynh_script_progression --message="Setuping the cron file"
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION