1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/matomo_ynh.git synced 2024-09-03 19:45:56 +02:00
This commit is contained in:
ericgaspar 2020-12-09 19:12:56 +01:00
parent a9b6294269
commit 3bf27f6e09
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 5 additions and 26 deletions

View file

@ -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

View file

@ -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
#=================================================