mirror of
https://github.com/YunoHost-Apps/phpbb_ynh.git
synced 2024-09-03 19:56:36 +02:00
Merge pull request #21 from YunoHost-Apps/testing
Automated testing -> master
This commit is contained in:
commit
ee0bd377e3
10 changed files with 23 additions and 60 deletions
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# phpBB for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ No se debe editar a mano.
|
|||
|
||||
# phpBB para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
|||
|
||||
# phpBB YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
# phpBB pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
|||
|
||||
# phpBB para YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# YunoHost 上的 phpBB
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpbb)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/phpbb/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=phpbb)
|
||||
|
||||
|
|
|
@ -27,18 +27,8 @@ ynh_backup --src_path="$install_dir"
|
|||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -36,28 +36,28 @@ chmod -R o-rwx "$install_dir"
|
|||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION WITH CLI
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring $app..." --weight=1
|
||||
ynh_script_progression --message="Adding $app's configuration files..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/install-config.yml.default" --destination="$install_dir/install/install-config.yml"
|
||||
ynh_add_config --template="install-config.yml.default" --destination="$install_dir/install/install-config.yml"
|
||||
|
||||
ynh_exec_as "$app" php${phpversion} "$install_dir/install/phpbbcli.php" -q --no-interaction install "$install_dir/install/install-config.yml"
|
||||
|
||||
mv "$install_dir/install" "$install_dir/install_old"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
ynh_add_fpm_config
|
||||
|
||||
ynh_add_config --template="../conf/phpbb.cron" --destination="/etc/cron.d/$app"
|
||||
ynh_add_config --template="phpbb.cron" --destination="/etc/cron.d/$app"
|
||||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
|
|
|
@ -10,15 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -29,13 +20,6 @@ ynh_restore_file --origin_path="$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=50
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -44,9 +28,13 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
|||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring various files..."
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=50
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
|
|
|
@ -9,23 +9,13 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="config.php images/ files/ store/"
|
||||
fi
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
@ -38,13 +28,8 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
|
Loading…
Add table
Reference in a new issue