mirror of
https://github.com/YunoHost-Apps/grav_ynh.git
synced 2024-09-03 19:16:01 +02:00
commit
9a71e4d7a9
6 changed files with 31 additions and 28 deletions
|
@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
||||||
## Overview
|
## Overview
|
||||||
Grav is a modern open source flat-file CMS.
|
Grav is a modern open source flat-file CMS.
|
||||||
|
|
||||||
Provided version: **1.7.7**
|
Provided version: **1.7.10**
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.7/grav-update-v1.7.7.zip
|
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.10/grav-update-v1.7.10.zip
|
||||||
SOURCE_SUM=3BCBBA56DBC0212A5740F862D25A5A864479D8A4CDF531563A64C51EF4670F7D
|
SOURCE_SUM=91F704B33C8BA8FBB5A0981DE70B92CD52BD8F833B3AFB53F98BF66CE04C2123
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.7/grav-admin-v1.7.7.zip
|
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.10/grav-admin-v1.7.10.zip
|
||||||
SOURCE_SUM=357E084885AEE04032E8E7F90B719434A4DE2588A2C3035140D210C0C7AE204F
|
SOURCE_SUM=0FF6ADD05384DDA0ED07551674A70E3F3FF9117AE6B2D16E1BCE0CACD348C4D8
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "A modern open source flat-file CMS",
|
"en": "A modern open source flat-file CMS",
|
||||||
"fr": "Un CMS moderne basé sur des fichiers plats"
|
"fr": "Un CMS moderne basé sur des fichiers plats"
|
||||||
},
|
},
|
||||||
"version": "1.7.7~ynh1",
|
"version": "1.7.10~ynh1",
|
||||||
"url": "https://www.getgrav.org/",
|
"url": "https://www.getgrav.org/",
|
||||||
"license": "MIT-0",
|
"license": "MIT-0",
|
||||||
"maintainer": [
|
"maintainer": [
|
||||||
|
@ -63,6 +63,10 @@
|
||||||
{
|
{
|
||||||
"name": "language",
|
"name": "language",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose the application language",
|
||||||
|
"fr": "Choisissez la langue de l'application"
|
||||||
|
},
|
||||||
"choices": ["en_EN", "fr_FR"],
|
"choices": ["en_EN", "fr_FR"],
|
||||||
"default": "fr_FR"
|
"default": "fr_FR"
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,9 @@ find "$final_path" -type d -exec chmod +s {} \;
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=1
|
ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=1
|
||||||
|
|
||||||
exec_as $app php${YNH_PHP_VERSION} "$final_path/bin/gpm" install login-ldap --all-yes --no-interaction
|
pushd "$final_path"
|
||||||
|
exec_as $app php${YNH_PHP_VERSION} bin/gpm install login-ldap --no-interaction
|
||||||
|
popd
|
||||||
exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap"
|
exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap"
|
||||||
exec_as $app touch "$final_path/user/accounts/admin.yaml"
|
exec_as $app touch "$final_path/user/accounts/admin.yaml"
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,18 @@ if ynh_legacy_permissions_exists; then
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Giving admin permission to the specified used
|
||||||
|
if ! ynh_permission_exists --permission "admin"
|
||||||
|
then
|
||||||
|
ynh_permission_create --permission "admin" --allowed "$admin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Creating user permission
|
||||||
|
if ! ynh_permission_exists --permission "user"
|
||||||
|
then
|
||||||
|
ynh_permission_create --permission "user"
|
||||||
|
fi
|
||||||
|
|
||||||
# If fpm_footprint doesn't exist, create it
|
# If fpm_footprint doesn't exist, create it
|
||||||
if [ -z "$fpm_footprint" ]; then
|
if [ -z "$fpm_footprint" ]; then
|
||||||
fpm_footprint=medium
|
fpm_footprint=medium
|
||||||
|
@ -142,14 +154,18 @@ find "$final_path" -type d -exec chmod +s {} \;
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating all plugins..." --weight=1
|
ynh_script_progression --message="Updating all plugins..." --weight=1
|
||||||
|
|
||||||
yes N | ynh_exec_warn_less exec_as $app php${YNH_PHP_VERSION} $final_path/bin/gpm update --all-yes --no-interaction
|
pushd "$final_path"
|
||||||
|
ynh_exec_warn_less yes N | ynh_exec_warn_less exec_as $app php${YNH_PHP_VERSION} bin/gpm update --all-yes --no-interaction || ynh_print_warn --message="Automatic plugin upgrade has failed, you can upgrade them from your Grav admin panel."
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL LDAP PLUGIN
|
# INSTALL LDAP PLUGIN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=3
|
ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=3
|
||||||
|
|
||||||
exec_as $app php${YNH_PHP_VERSION} "$final_path/bin/gpm" install login-ldap --all-yes --no-interaction
|
pushd "$final_path"
|
||||||
|
exec_as $app php${YNH_PHP_VERSION} bin/gpm install login-ldap --no-interaction
|
||||||
|
popd
|
||||||
exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap"
|
exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap"
|
||||||
exec_as $app touch "$final_path/user/accounts/admin.yaml"
|
exec_as $app touch "$final_path/user/accounts/admin.yaml"
|
||||||
|
|
||||||
|
@ -163,25 +179,6 @@ chmod 640 "$final_path/user/config/plugins/login-ldap.yaml"
|
||||||
|
|
||||||
echo "* * * * * $app php${YNH_PHP_VERSION} $final_path/bin/grav scheduler 1>> /dev/null 2>&1" > /etc/cron.d/$app
|
echo "* * * * * $app php${YNH_PHP_VERSION} $final_path/bin/grav scheduler 1>> /dev/null 2>&1" > /etc/cron.d/$app
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP PERMISSIONS
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
|
||||||
|
|
||||||
# Giving admin permission to the specified used
|
|
||||||
if ! ynh_permission_exists --permission "admin"
|
|
||||||
then
|
|
||||||
ynh_permission_create --permission "admin" --allowed "$admin"
|
|
||||||
else
|
|
||||||
ynh_permission_update --permission "admin" --add "$admin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Creating user permission
|
|
||||||
if ! ynh_permission_exists --permission "user"
|
|
||||||
then
|
|
||||||
ynh_permission_create --permission "user"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue