mirror of
https://github.com/YunoHost-Apps/alltube_ynh.git
synced 2024-09-03 18:06:12 +02:00
commit
bc775fc2da
6 changed files with 7 additions and 22 deletions
|
@ -4,11 +4,6 @@ location __PATH__/ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri @__NAME__;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"email": "plopoyop@gmail.com"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.0"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -32,8 +32,7 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="ffmpeg"
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mbstring"
|
||||
pkg_dependencies="ffmpeg php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mbstring"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -92,11 +92,12 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
cp ../conf/config.yml "$final_path/config/"
|
||||
|
||||
|
|
|
@ -34,10 +34,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
|
@ -74,9 +71,6 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
|||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
|
|
@ -23,7 +23,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
@ -106,7 +105,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
|
Loading…
Add table
Reference in a new issue