1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Merge pull request #59 from YunoHost-Apps/testing

Testing
This commit is contained in:
tituspijean 2021-03-06 17:18:09 +01:00 committed by GitHub
commit efb72f342c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 11 deletions

View file

@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview
Grav is a modern open source flat-file CMS.
Provided version: **1.7.5**
Provided version: **1.7.6**
## Screenshots

View file

@ -26,7 +26,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=2909df6045ffab5378623c9fc05c9a69eac35a2e
upgrade=1 from_commit=12e86653bc6c91208b3abaf4243a7ebb996cada6
backup_restore=1
multi_instance=1
port_already_use=0 (66)
@ -37,6 +37,6 @@
Email=tituspijean@outlook.com
Notification=none
;;; Upgrade options
; commit=2909df6045ffab5378623c9fc05c9a69eac35a2e
name=Upgrade to v1.6.26, YNH v3.7 permissions system, PHP version handling…
; commit=12e86653bc6c91208b3abaf4243a7ebb996cada6
name=Upgrade to v1.7.5
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr_FR&is_public=1&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.5/grav-update-v1.7.5.zip
SOURCE_SUM=7A6F1A509E699448BF85516D3588263AF0679B69170810D90EFD6C5FC53BC3DA
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.6/grav-update-v1.7.6.zip
SOURCE_SUM=2EBFDF0B7E3FAED83157FC6AD4A2A70E92188FF37B54AF1F6955F840097ADD59
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.5/grav-admin-v1.7.5.zip
SOURCE_SUM=3A53CBCACFB7C80838D83EBD8A534FEE80D4E99382CE377881112354314B3A3E
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.6/grav-admin-v1.7.6.zip
SOURCE_SUM=2CBC8E11706AE149DBF91E556376F63271BF9ABB8AB2A774C524E85109C0BF82
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "A modern open source flat-file CMS",
"fr": "Un CMS moderne basé sur des fichiers plats"
},
"version": "1.7.5~ynh1",
"version": "1.7.6~ynh1",
"url": "https://www.getgrav.org/",
"license": "MIT-0",
"maintainer": [

View file

@ -45,13 +45,19 @@ ynh_backup --src_path="$final_path"
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup "/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 "/etc/php/${phpversion}/fpm/pool.d/$app.conf"
ynh_backup --src_path="/etc/php/${phpversion}/fpm/pool.d/$app.conf"
#=================================================
# BACKUP CRON
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# END OF SCRIPT

View file

@ -118,6 +118,12 @@ ynh_replace_string "__ADMIN__" "$admin" "$final_path/user/plugins/login-ldap/log
ynh_replace_string "__APP__" "$app" "$final_path/user/plugins/login-ldap/login-ldap.yaml"
exec_as $app cp "$final_path/user/plugins/login-ldap/login-ldap.yaml" "$final_path/user/config/plugins/login-ldap.yaml"
#=================================================
# CREATE A CRON TASK
#=================================================
echo "* * * * * $app php${YNH_PHP_VERSION} $final_path/bin/grav scheduler 1>> /dev/null 2>&1" > /etc/cron.d/$app
#=================================================
# SETUP PERMISSIONS
#=================================================

View file

@ -31,6 +31,12 @@ ynh_script_progression --message="Removing dependencies..." --weight=2
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE THE CRON
#=================================================
ynh_secure_remove --file="/etc/cron.d/$app"
#=================================================
# REMOVE APP MAIN DIR
#=================================================

View file

@ -79,6 +79,12 @@ find $final_path/bin -type f -exec chmod 775 {} \;
find $final_path -type d -exec chmod 775 {} \;
find $final_path -type d -exec chmod +s {} \;
#=================================================
# RESTORE THE CRON
#=================================================
ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================

View file

@ -183,6 +183,12 @@ ynh_replace_string "__ADMIN__" "$admin" "$final_path/user/plugins/login-ldap/log
ynh_replace_string "__APP__" "$app" "$final_path/user/plugins/login-ldap/login-ldap.yaml"
exec_as $app cp "$final_path/user/plugins/login-ldap/login-ldap.yaml" "$final_path/user/config/plugins/login-ldap.yaml"
#=================================================
# CREATE A CRON TASK
#=================================================
echo "* * * * * $app php${YNH_PHP_VERSION} $final_path/bin/grav scheduler 1>> /dev/null 2>&1" > /etc/cron.d/$app
#=================================================
# SETUP PERMISSIONS
#=================================================