mirror of
https://github.com/YunoHost-Apps/zerobin_ynh.git
synced 2024-09-03 18:06:01 +02:00
cleaning
This commit is contained in:
parent
8746c19b0e
commit
c50f187f1b
6 changed files with 13 additions and 50 deletions
|
@ -19,7 +19,7 @@ admindoc = "https://github.com/PrivateBin/PrivateBin/wiki"
|
||||||
code = "https://github.com/PrivateBin/PrivateBin"
|
code = "https://github.com/PrivateBin/PrivateBin"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 4.3.0"
|
yunohost = ">= 11.2"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
|
@ -30,11 +30,9 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "domain"
|
type = "domain"
|
||||||
|
|
||||||
[install.path]
|
[install.path]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "path"
|
type = "path"
|
||||||
default = "/zerobin"
|
default = "/zerobin"
|
||||||
|
|
||||||
|
|
|
@ -22,15 +22,11 @@ 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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,18 +23,13 @@ chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
|
@ -10,18 +10,13 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=3
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
|
|
||||||
|
|
||||||
# Remove the dedicated PHP-FPM config
|
# Remove the dedicated PHP-FPM config
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,12 @@ chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
|
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/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -9,26 +9,15 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Checking version..."
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
then
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Except for data and tmp subdir, where the user must have write permissions
|
# Except for data and tmp subdir, where the user must have write permissions
|
||||||
mkdir -p $install_dir/{data,tmp}
|
mkdir -p $install_dir/{data,tmp}
|
||||||
|
@ -38,18 +27,13 @@ chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
|
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue