mirror of
https://github.com/YunoHost-Apps/yellow_ynh.git
synced 2024-09-03 20:36:12 +02:00
parent
225c6a010b
commit
fb406ca10b
8 changed files with 39 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/datenstrom/yellow/archive/4dd3a67b9e71e218bebabe597ecea73abf8065eb.zip
|
||||
SOURCE_SUM=2457079240bf690cc7b40bad2d4a7a228b467fd2549b17a2bdb5587e76e523b4
|
||||
SOURCE_URL=https://github.com/datenstrom/yellow/archive/bceeeba72ba628332c345d52556fb16980f47c65.zip
|
||||
SOURCE_SUM=27f94851517fe3334ac254d76e80b4120c45af1b88944d0f136d7cfc0ba751dc
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -15,11 +15,6 @@ location __PATH__/ {
|
|||
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index yellow.php;
|
||||
|
||||
if (!-e $request_filename) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"name": "eric_G"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">> 4.2.4"
|
||||
"yunohost": ">> 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip"
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -23,6 +23,7 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -44,6 +45,14 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -80,8 +89,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -43,6 +43,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3
|
|||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -33,8 +33,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||
|
||||
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
|
||||
|
@ -69,7 +68,14 @@ chown -R $app:www-data "$final_path"
|
|||
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -91,13 +91,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue