mirror of
https://github.com/YunoHost-Apps/plainpad_ynh.git
synced 2024-09-03 20:05:53 +02:00
cleaning
This commit is contained in:
parent
da938b917b
commit
33cad92d7f
5 changed files with 14 additions and 34 deletions
|
@ -67,12 +67,12 @@ ram.runtime = "50M"
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = [
|
packages = [
|
||||||
"mariadb-server",
|
"mariadb-server",
|
||||||
"php8.0-zip",
|
"php8.3-zip",
|
||||||
"php8.0-fileinfo",
|
"php8.3-fileinfo",
|
||||||
"php8.0-xml",
|
"php8.3-xml",
|
||||||
"php8.0-bcmath",
|
"php8.3-bcmath",
|
||||||
"php8.0-mbstring",
|
"php8.3-mbstring",
|
||||||
"php8.0-mysql",
|
"php8.3-mysql",
|
||||||
]
|
]
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
|
|
|
@ -22,23 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
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"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC BACKUP
|
|
||||||
#=================================================
|
|
||||||
# BACKUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
domain=$new_domain
|
domain=$new_domain
|
||||||
path=$new_path
|
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"
|
chmod 400 "$install_dir/.env"
|
||||||
chown $app:$app "$install_dir/.env"
|
chown $app:$app "$install_dir/.env"
|
||||||
|
|
|
@ -36,7 +36,7 @@ ynh_script_progression --message="Adding system configurations related to $app..
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM 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)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
@ -46,7 +46,7 @@ ynh_use_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
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"
|
chmod 400 "$install_dir/.env"
|
||||||
chown $app:$app "$install_dir/.env"
|
chown $app:$app "$install_dir/.env"
|
||||||
|
|
|
@ -9,23 +9,13 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=4
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
then
|
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
|
||||||
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
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$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
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM 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)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
Loading…
Reference in a new issue