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"
|
php_version="7.3"
|
||||||
project_version="0.1.0-beta.10"
|
project_version="0.1.0-beta.10"
|
||||||
core_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
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -99,6 +99,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
# ...
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/config.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# 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
|
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade 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
|
# CREATE DEDICATED USER
|
||||||
|
@ -121,6 +121,7 @@ ynh_install_composer $php_version $final_path
|
||||||
|
|
||||||
# Prepare Flarum temp directory
|
# Prepare Flarum temp directory
|
||||||
tmp=/tmp/$app
|
tmp=/tmp/$app
|
||||||
|
ynh_secure_remove --file="$tmp"
|
||||||
mkdir -p $tmp
|
mkdir -p $tmp
|
||||||
chown -R $app:www-data $tmp
|
chown -R $app:www-data $tmp
|
||||||
chmod -R 0775 $tmp
|
chmod -R 0775 $tmp
|
||||||
|
@ -248,7 +249,7 @@ ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
case $language in
|
case $language in
|
||||||
fr)
|
fr)
|
||||||
ynh_script_progression --message="Installing French extension..." --time --weight=2
|
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'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
;;
|
;;
|
||||||
|
@ -262,7 +263,7 @@ esac
|
||||||
|
|
||||||
if [ $bazaar_extension -eq 1 ]; then
|
if [ $bazaar_extension -eq 1 ]; then
|
||||||
ynh_script_progression --message="Installing Bazaar extension..." --time --weight=2
|
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
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -77,6 +77,14 @@ ynh_restore_file --origin_path="/etc/php/${php_version}/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# 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
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -121,7 +121,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
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
|
# 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
|
# Backing up the app directory
|
||||||
tmpbak="/tmp/${app}backup"
|
tmpbak="/tmp/${app}backup"
|
||||||
|
ynh_secure_remove --file="$tmpbak"
|
||||||
mkdir -p $tmpbak
|
mkdir -p $tmpbak
|
||||||
cp -R $final_path/* $tmpbak
|
cp -R $final_path/* $tmpbak
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue