1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00
This commit is contained in:
Éric Gaspar 2023-05-21 11:33:55 +02:00
parent 10cd45a98a
commit 351094079f
2 changed files with 3 additions and 36 deletions

View file

@ -14,8 +14,8 @@ source /usr/share/yunohost/helpers
#=================================================
email=$(ynh_user_get_info --username=$admin --key=mail)
upload="256M"
random_string="$(ynh_string_random --length=48)"
timezone=$(cat /etc/timezone)
fpm_footprint="low"
fpm_free_footprint=0
@ -26,9 +26,6 @@ fpm_usage="low"
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=database --value=$database
ynh_app_setting_set --app=$app --key=email --value=$email
ynh_app_setting_set --app=$app --key=upload --value=$upload
ynh_app_setting_set --app=$app --key=random_string --value=$random_string
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
@ -59,11 +56,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config

View file

@ -15,6 +15,7 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Loading settings..." --weight=1
email=$(ynh_user_get_info --username=$admin --key=mail)
timezone=$(cat /etc/timezone)
#=================================================
# CHECK VERSION
@ -73,37 +74,11 @@ chmod -R 775 $install_dir/store $install_dir/cache
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
if [ $database = "mysql" ]; then
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_dir/.htconfig.php"
# addon ldap config
ynh_script_progression --message="Push LDAP configuration to .htconfig.php..."
cat ../conf/ldap_conf.php >> $install_dir/.htconfig.php
ynh_store_file_checksum --file=$install_dir/.htconfig.php
chmod 600 "$install_dir/.htconfig.php"
chown $app:$app "$install_dir/.htconfig.php"
#=================================================
# UPGRADE CRON JOB
#=================================================