1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpservermon_ynh.git synced 2024-09-03 19:56:40 +02:00
This commit is contained in:
ericgaspar 2021-07-17 12:32:05 +02:00 committed by BenoitCier
parent f5365c9652
commit 7866b7d3ee
4 changed files with 5 additions and 9 deletions

View file

@ -60,7 +60,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# CREATE A MYSQL DATABASE # CREATE A MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Creating a MySQL database..." --weight=1 ynh_script_progression --message="Creating a MySQL database..." --weight=2
db_name=$(ynh_sanitize_dbid --db_name=$app) db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name db_user=$db_name
@ -70,7 +70,7 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=1 ynh_script_progression --message="Setting up source files..." --weight=3
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
@ -100,6 +100,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Setuping a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php.sample" --destination="$final_path/config.php" ynh_add_config --template="../conf/config.php.sample" --destination="$final_path/config.php"
chmod 400 "$final_path/config.php" chmod 400 "$final_path/config.php"

View file

@ -56,9 +56,8 @@ ynh_remove_fpm_config
#================================================= #=================================================
# REMOVE THE CRON FILE # REMOVE THE CRON FILE
#================================================= #=================================================
ynh_script_progression --message="Removing cron file..." --weight=1
# Remove a cron file
# TODO: Ensure that cron job is not running (How !?)
ynh_secure_remove --file="/etc/cron.d/$app" ynh_secure_remove --file="/etc/cron.d/$app"
#================================================= #=================================================

View file

@ -50,6 +50,7 @@ test ! -d $final_path \
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -26,11 +26,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================