1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Merge branch 'testing' into language

This commit is contained in:
ericgaspar 2021-07-19 10:37:20 +02:00
commit 49d9c66639
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 19 additions and 19 deletions

View file

@ -13,7 +13,7 @@
upgrade=1 from_commit=41c39d47e4e398339b7d6a4167ca2198dae998e3 upgrade=1 from_commit=41c39d47e4e398339b7d6a4167ca2198dae998e3
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
change_url=0 change_url=1
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none

View file

@ -7,7 +7,7 @@ location __PATH__/ {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
if (!-e $request_filename) { if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1; rewrite ^(.*)$ /index.php?pagename=$1;
} }

View file

@ -124,7 +124,7 @@ ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP_FPM..." --weight=1 ynh_script_progression --message="Configuring PHP_FPM..." --weight=4
# Create a dedicated PHP-FPM configy # Create a dedicated PHP-FPM configy
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config --package="$extra_php_dependencies"
@ -155,14 +155,6 @@ popd
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');" ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');"
#=================================================
# SETUP SSOWAT
#=================================================
# ynh_script_progression --message="Configuring permissions..." --weight=1
# # unprotected_uris allows SSO credentials to be passed anyway.
# ynh_permission_update --permission="main" --add="visitors"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================

View file

@ -68,6 +68,11 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight=
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
#=================================================
# REMOVE CRON FILE
#=================================================
ynh_script_progression --message="Removing cron file..." --weight=1
# Remove a cron file # Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app" ynh_secure_remove --file="/etc/cron.d/$app"

View file

@ -32,6 +32,8 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
@ -80,7 +82,7 @@ ynh_restore_file --origin_path="$final_path"
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
chmod -R 775 $final_path/view/smarty3 chmod -R 775 "$final_path/view/smarty3"
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION

View file

@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
email=$(ynh_app_setting_get --app=$app --key=email) email=$(ynh_app_setting_get --app=$app --key=email)
admin=$(ynh_app_setting_get --app=$app --key=admin) admin=$(ynh_app_setting_get --app=$app --key=admin)
@ -113,7 +114,7 @@ then
# Check if the repo can be updated with git # Check if the repo can be updated with git
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
then then
# Update through git # Update through Git
pushd "$final_path" pushd "$final_path"
git fetch git fetch
git checkout stable git checkout stable
@ -126,10 +127,10 @@ then
git pull git pull
git reset --hard $addons_version_commit git reset --hard $addons_version_commit
popd popd
# If git is not present upgrade through manual method # If Git is not present upgrade through manual method
else else
# Create a temporary directory and backup smarty3 folder # Create a temporary directory and backup smarty3 folder
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
ynh_script_progression --message="Upgrading source files..." --weight=3 ynh_script_progression --message="Upgrading source files..." --weight=3
cp -a "$final_path/view/smarty3" "$tmpdir/smarty3" cp -a "$final_path/view/smarty3" "$tmpdir/smarty3"
@ -165,7 +166,7 @@ chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
# 3 - some extra folders # 3 - some extra folders
chmod -R 775 $final_path/view/smarty3 chmod -R 775 "$final_path/view/smarty3"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -178,7 +179,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config --package="$extra_php_dependencies"
@ -191,11 +192,11 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app" chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app"
# Run composer # Run Composer
pushd "$final_path" pushd "$final_path"
ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet
ynh_exec_as "$app" bin/console dbstructure update ynh_exec_as "$app" bin/console dbstructure update
ynh_exec_as "$app" bin/console config system addon ldapauth #ynh_exec_as "$app" bin/console config system addon ldapauth
popd popd
#================================================= #=================================================