1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/firefly-iii_ynh.git synced 2024-09-03 18:36:13 +02:00
This commit is contained in:
Éric Gaspar 2024-01-02 23:13:36 +01:00
parent 3982e0366d
commit c63efea33f
4 changed files with 11 additions and 46 deletions

View file

@ -35,7 +35,6 @@ ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
#=================================================
ynh_script_progression --message="Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$install_dir
chmod -R o-rwx "$install_dir"
@ -47,10 +46,8 @@ chmod -R 775 $install_dir/storage
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -67,7 +64,7 @@ ynh_exec_warn_less ynh_install_composer --phpversion=$phpversion --workdir=$inst
#=================================================
ynh_script_progression --message="Adding a configuration file..."
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app "$install_dir/.env"
@ -95,7 +92,7 @@ popd
#=================================================
ynh_script_progression --message="Setuping a cron..."
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"

View file

@ -14,24 +14,10 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..."
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..."
# Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app"

View file

@ -20,20 +20,6 @@ ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
@ -42,9 +28,13 @@ ynh_script_progression --message="Restoring the MySQL database..."
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE VARIOUS FILES
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring various files..."
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
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"
ynh_restore_file --origin_path="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"

View file

@ -53,7 +53,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".env storage/upload storage/export"
fi
@ -66,15 +65,8 @@ chmod -R 775 $install_dir/storage
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -91,7 +83,7 @@ ynh_exec_warn_less ynh_install_composer
#=================================================
# ynh_script_progression --message="Updating a configuration file..."
# ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
# ynh_add_config --template=".env" --destination="$install_dir/.env"
# chmod 400 "$install_dir/.env"
# chown $app "$install_dir/.env"
@ -115,7 +107,7 @@ popd
#=================================================
ynh_script_progression --message="Setuping a cron..."
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"