diff --git a/scripts/change_url b/scripts/change_url index 7d940e9..6a0f44b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 domain=$new_domain path=$new_path -ynh_add_config --template="../conf/config-sample.php" --destination="$install_dir/user/config.php" +ynh_add_config --template="config-sample.php" --destination="$install_dir/user/config.php" chmod 600 "$install_dir/user/config.php" chown $app:$app "$install_dir/user/config.php" diff --git a/scripts/install b/scripts/install index bd47ba3..1af5f6c 100644 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir/user/languages" --source_id="fr" # copy index file -cp ../conf/index.php $install_dir/ +ynh_add_config --template="index.php" --destination="$install_dir/index.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/restore b/scripts/restore index 9d4d5e5..d25e51e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=5 + +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -28,13 +35,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=5 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #=================================================