mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
commit
fb5098c853
5 changed files with 16 additions and 5 deletions
|
@ -9,7 +9,7 @@ pkg_dependencies="php7.3-curl php7.3-dom php7.3-gd php7.3-json php7.3-mbstring p
|
|||
php_version="7.3"
|
||||
project_version="0.1.0-beta.10"
|
||||
core_version="0.1.0-beta.10"
|
||||
ssowat_version="0.1.0-beta.10-1"
|
||||
ssowat_version="0.1.0-beta.10-2"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -99,6 +99,7 @@ fi
|
|||
#=================================================
|
||||
# ...
|
||||
#=================================================
|
||||
ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/config.php"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -95,7 +95,7 @@ ynh_script_progression --message="Installing dependencies..." --time --weight=1
|
|||
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
||||
|
||||
ynh_install_php --phpversion=7.3 --package="$pkg_dependencies"
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
|
||||
#===================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -121,6 +121,7 @@ ynh_install_composer $php_version $final_path
|
|||
|
||||
# Prepare Flarum temp directory
|
||||
tmp=/tmp/$app
|
||||
ynh_secure_remove --file="$tmp"
|
||||
mkdir -p $tmp
|
||||
chown -R $app:www-data $tmp
|
||||
chmod -R 0775 $tmp
|
||||
|
@ -248,7 +249,7 @@ ynh_mysql_execute_as_root "$sql_command" $db_name
|
|||
case $language in
|
||||
fr)
|
||||
ynh_script_progression --message="Installing French extension..." --time --weight=2
|
||||
install_and_activate_extension $app $php_version $final_path $db_name "milescellar/flarum-ext-french" "milescellar-french"
|
||||
install_and_activate_extension $app $php_version $final_path $db_name "milescellar/lang-french" "milescellar-lang-french"
|
||||
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||
;;
|
||||
|
@ -262,7 +263,7 @@ esac
|
|||
|
||||
if [ $bazaar_extension -eq 1 ]; then
|
||||
ynh_script_progression --message="Installing Bazaar extension..." --time --weight=2
|
||||
ynh_composer_exec $app $php_version $final_path "require flagrow/bazaar --ansi"
|
||||
ynh_composer_exec $app $php_version $final_path "require extiverse/bazaar --ansi"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -77,6 +77,14 @@ ynh_restore_file --origin_path="/etc/php/${php_version}/fpm/pool.d/$app.conf"
|
|||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -121,7 +121,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
||||
|
||||
ynh_install_php --phpversion=7.3 --package="$pkg_dependencies"
|
||||
ynh_install_php --phpversion=${php_version} --package="$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -168,6 +168,7 @@ if [[ $(dpkg --compare-versions $old_project_version lt "0.1.0-beta.8" && echo t
|
|||
|
||||
# Backing up the app directory
|
||||
tmpbak="/tmp/${app}backup"
|
||||
ynh_secure_remove --file="$tmpbak"
|
||||
mkdir -p $tmpbak
|
||||
cp -R $final_path/* $tmpbak
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue