1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shlink_ynh.git synced 2024-09-03 20:16:22 +02:00
This commit is contained in:
Éric Gaspar 2023-08-14 18:33:04 +02:00
parent cc67f2a0cc
commit eb8204b184
5 changed files with 12 additions and 34 deletions

View file

@ -1,5 +1,4 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

View file

@ -5,7 +5,7 @@ name = "Shlink"
description.en = "Self-hosted URL shortener"
description.fr = "Raccourcisseur d'URL auto-hébergé"
version = "3.4.0~ynh2"
version = "3.6.3~ynh1"
maintainers = []
@ -27,9 +27,7 @@ ram.runtime = "50M"
[install]
[install.domain]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "domain"
full_domain = true
[install.init_main_permission]
type = "group"
@ -38,12 +36,12 @@ ram.runtime = "50M"
[resources]
[resources.sources]
[resources.sources.front]
url = "https://github.com/shlinkio/shlink-web-client/releases/download/v3.7.3/shlink-web-client_3.7.3_dist.zip"
sha256 = "c843f34854a2b84fc63a8ba34073b8fe533962052feb01880bf0683846f2c612"
url = "https://github.com/shlinkio/shlink-web-client/releases/download/v3.10.2/shlink-web-client_3.10.2_dist.zip"
sha256 = "1b20c94be5025271504201199aead8ee0a7317885738a00913f5a196f9e03d7d"
[resources.sources.main]
url = "https://github.com/shlinkio/shlink/releases/download/v3.4.0/shlink3.4.0_php8.1_dist.zip"
sha256 = "e37e91cd86a8d495952783d1eeb94f157ddfe42f50849a3c2f979b1f9d991963"
url = "https://github.com/shlinkio/shlink/releases/download/v3.6.3/shlink3.6.3_php8.2_dist.zip"
sha256 = "7b6fc0dde2ea8ae2c3540755bdfda561a73ad7142cfd862565e4acb796633013"
[resources.system_user]

View file

@ -22,10 +22,8 @@ ynh_script_progression --message="Setting up source files..." --weight=2
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
@ -36,11 +34,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config

View file

@ -17,9 +17,15 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
@ -27,20 +33,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -27,7 +27,6 @@ then
ynh_setup_source --dest_dir="$install_dir"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
@ -38,11 +37,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage="low" --footprint="low"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3
# Create a dedicated NGINX config
ynh_add_nginx_config