mirror of
https://github.com/YunoHost-Apps/grocy_ynh.git
synced 2024-09-03 19:25:54 +02:00
cleaning
This commit is contained in:
parent
be42486c48
commit
53bb02f947
4 changed files with 8 additions and 55 deletions
|
@ -65,4 +65,4 @@ ram.runtime = "50M"
|
|||
api.protected = true
|
||||
|
||||
[resources.apt]
|
||||
packages = "php8.2-ldap, php8.2-mbstring, php8.2-fileinfo, php8.2-sqlite3, php8.2-gd, php8.2-intl"
|
||||
packages = "php8.3-ldap, php8.3-mbstring, php8.3-fileinfo, php8.3-sqlite3, php8.3-gd, php8.3-intl"
|
||||
|
|
|
@ -13,15 +13,11 @@ ynh_print_info "Declaring files to be backed up..."
|
|||
ynh_backup "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -3,22 +3,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | fpm_footprint="low"
|
||||
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | fpm_free_footprint=0
|
||||
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | fpm_usage="low"
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
||||
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint
|
||||
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
|
|
@ -3,40 +3,14 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression "Ensuring downward compatibility..."
|
||||
|
||||
# If fpm_footprint doesn't exist, create it
|
||||
if [ -z "${fpm_footprint:-}" ]; then
|
||||
fpm_footprint=low
|
||||
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint
|
||||
fi
|
||||
|
||||
# If fpm_free_footprint doesn't exist, create it
|
||||
if [ -z "${fpm_free_footprint:-}" ]; then
|
||||
fpm_free_footprint=0
|
||||
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||
fi
|
||||
|
||||
# If fpm_usage doesn't exist, create it
|
||||
if [ -z "${fpm_usage:-}" ]; then
|
||||
fpm_usage=low
|
||||
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="data"
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="data"
|
||||
ynh_safe_rm "$install_dir/data/viewcache/*"
|
||||
fi
|
||||
ynh_safe_rm "$install_dir/data/viewcache/*"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
@ -48,17 +22,16 @@ ynh_script_progression "Upgrading NGINX web server configuration..."
|
|||
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_config_add_phpfpm
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
#ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php"
|
||||
ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php"
|
||||
|
||||
#chmod 400 "$install_dir/data/config.php"
|
||||
#chown $app "$install_dir/data/config.php"
|
||||
chmod 400 "$install_dir/data/config.php"
|
||||
chown $app "$install_dir/data/config.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue