1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/chtickynotes_ynh.git synced 2024-09-03 18:15:57 +02:00
This commit is contained in:
Éric Gaspar 2023-10-03 12:10:16 +02:00 committed by Salamandar
parent 375645dad0
commit f2d768c3d3
5 changed files with 16 additions and 39 deletions

View file

@ -16,7 +16,7 @@ license = "MIT"
code = "https://github.com/YunoHost-Apps/chtickynotes_ynh/"
[integration]
yunohost = ">= 11.0.9"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = false
ldap = false # TODO:
@ -47,6 +47,5 @@ ram.runtime = "10M"
[resources.apt]
packages = [
"php7.4",
"php7.4-fpm",
]

View file

@ -16,23 +16,17 @@ ynh_script_progression --message="Setting up source files..." --weight=7
cp -a ../sources/* "$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..."
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
#=================================================
# END OF SCRIPT

View file

@ -10,17 +10,12 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE NGINX CONFIGURATION
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..."
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..."
ynh_remove_fpm_config
#=================================================

View file

@ -10,15 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# 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 APP MAIN DIR
#=================================================
@ -26,23 +17,26 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
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"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemd_action --service_name="nginx" --action=reload

View file

@ -21,18 +21,13 @@ chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# NGINX CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
#=================================================
# END OF SCRIPT