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:
parent
fc3d8de65e
commit
dc6c138d05
3 changed files with 18 additions and 20 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue