diff --git a/conf/cron b/conf/cron index 8e8ce50..8d0c5c3 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ MAILTO="admin" -5 * * * * __USER__ /usr/bin/php YNH_WWW_PATH/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null +5 * * * * __USER__ /usr/bin/php__PHPVERSION__ __FINALPATH__/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null diff --git a/scripts/install b/scripts/install index 6eb4f78..c4061ad 100755 --- a/scripts/install +++ b/scripts/install @@ -96,7 +96,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # INSTALL COMPOSER AND DEPENDENCIES #================================================= -ynh_script_progression --message="Installing composer and dependencies..." +ynh_script_progression --message="Installing Composer and dependencies..." ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" @@ -105,35 +105,14 @@ ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" #================================================= ynh_script_progression --message="Setuping a cron..." -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/cron" +ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/cron" ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/cron" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../conf/cron" +ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="../conf/cron" + cp -f ../conf/cron /etc/cron.d/$app -#================================================= -# MODIFY A CONFIG FILE (TO DO: Automate install) -#================================================= -ynh_script_progression --message="Modifying a config file..." - -### `ynh_replace_string` is used to replace a string in a file. -### (It's compatible with sed regular expressions syntax) -## cp -f ../conf/config.ini.php "$final_path/config/config.ini.php" -## ynh_replace_string "__DB__" "$db_name" "$final_path/config/config.ini.php" -## ynh_replace_string "__DB_PASSWORD__" "$db_pwd" "$final_path/config/config.ini.php" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storing the config file checksum..." - -### `ynh_store_file_checksum` is used to store the checksum of a file. -### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, -### you can make a backup of this file before modifying it again if the admin had modified it. - -# Calculate and store the config file checksum into the app settings -## ynh_store_file_checksum --file="$final_path/CONFIG_FILE" - #================================================= # GENERIC FINALIZATION #=================================================