1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/getsimple_ynh.git synced 2024-09-03 18:36:25 +02:00
This commit is contained in:
Éric Gaspar 2024-06-24 11:37:53 +02:00
parent 13ad9c4350
commit 6dadc0dc19
6 changed files with 8 additions and 44 deletions

View file

@ -16,7 +16,7 @@ admindoc = "http://get-simple.info/wiki/fr:start"
code = "https://github.com/GetSimpleCMS/GetSimpleCMS" code = "https://github.com/GetSimpleCMS/GetSimpleCMS"
[integration] [integration]
yunohost = ">= 11.1.20" yunohost = ">= 11.2"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = false ldap = false

View file

@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" 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" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================

View file

@ -32,10 +32,8 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config ynh_add_fpm_config
ynh_add_fpm_config --usage=low --footprint=low
# Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#================================================= #=================================================
@ -45,7 +43,7 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$install_dir/gsconfig.php" ynh_add_config --template="temp.gsconfig.php" --destination="$install_dir/gsconfig.php"
chmod 400 "$install_dir/gsconfig.php" chmod 400 "$install_dir/gsconfig.php"
chown $app:$app "$install_dir/gsconfig.php" chown $app:$app "$install_dir/gsconfig.php"
@ -55,9 +53,6 @@ chown $app:$app "$install_dir/gsconfig.php"
#================================================= #=================================================
ynh_script_progression --message="Setuping application with CURL..." ynh_script_progression --message="Setuping application with CURL..."
# Set the app as temporarily public for curl call
ynh_script_progression --message="Configuring SSOwat..."
# Installation with curl # Installation with curl
ynh_script_progression --message="Finalizing installation..." ynh_script_progression --message="Finalizing installation..."
ynh_local_curl "/admin/install.php" "lang=$language" "continue=continue" ynh_local_curl "/admin/install.php" "lang=$language" "continue=continue"

View file

@ -14,15 +14,8 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config ynh_remove_fpm_config
#================================================= #=================================================

View file

@ -27,11 +27,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================

View file

@ -15,23 +15,13 @@ source /usr/share/yunohost/helpers
timezone="$(cat /etc/timezone)" timezone="$(cat /etc/timezone)"
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="gsconfig.php data/ backups/" ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="gsconfig.php data/ backups/"
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -42,12 +32,7 @@ chown -R $app:www-data "$install_dir"
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -59,7 +44,7 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." ynh_script_progression --message="Updating a configuration file..."
ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$install_dir/gsconfig.php" ynh_add_config --template="temp.gsconfig.php" --destination="$install_dir/gsconfig.php"
chmod 400 "$install_dir/gsconfig.php" chmod 400 "$install_dir/gsconfig.php"
chown $app:$app "$install_dir/gsconfig.php" chown $app:$app "$install_dir/gsconfig.php"