1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plainpad_ynh.git synced 2024-09-03 20:05:53 +02:00
This commit is contained in:
Éric Gaspar 2024-06-19 21:27:03 +02:00
parent da938b917b
commit 33cad92d7f
5 changed files with 14 additions and 34 deletions

View file

@ -67,12 +67,12 @@ ram.runtime = "50M"
[resources.apt]
packages = [
"mariadb-server",
"php8.0-zip",
"php8.0-fileinfo",
"php8.0-xml",
"php8.0-bcmath",
"php8.0-mbstring",
"php8.0-mysql",
"php8.3-zip",
"php8.3-fileinfo",
"php8.3-xml",
"php8.3-bcmath",
"php8.3-mbstring",
"php8.3-mysql",
]
[resources.database]

View file

@ -22,23 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
domain=$new_domain
path=$new_path
ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env"
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"

View file

@ -36,7 +36,7 @@ ynh_script_progression --message="Adding system configurations related to $app..
ynh_add_nginx_config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
@ -46,7 +46,7 @@ ynh_use_logrotate
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env"
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"

View file

@ -9,23 +9,13 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=4
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -39,7 +29,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
ynh_add_nginx_config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append