diff --git a/README.md b/README.md index 35572cb..0329d0e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to * http://getgrav.org/ * https://github.com/getgrav/grav -Provided version: **1.5.1** +Provided version: **1.5.2** ## Installation diff --git a/conf/app-upgrade.src b/conf/app-upgrade.src index 08afa35..30fed8f 100644 --- a/conf/app-upgrade.src +++ b/conf/app-upgrade.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.5.1/grav-update-v1.5.1.zip -SOURCE_SUM=D1D1BD1937848F54A707778DCF315EB17D95A3D9094DCC4189F0189C4824FC7C +SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.5.2/grav-update-v1.5.2.zip +SOURCE_SUM=A8E0289419DC9DB8D64758306376DBF0E827CC45F4015A6FA678C2EE36B32FF8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/app.src b/conf/app.src index a40951f..d6ba121 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.5.1/grav-admin-v1.5.1.zip -SOURCE_SUM=34f48f984ef734e66ccc1c9fc30f5d5f512ee0febc4576c63b657bf4c5461160 +SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.5.2/grav-admin-v1.5.2.zip +SOURCE_SUM=42B20D1C569A3089BBE8111AEFD133FE07BB455BFC8A55C3A8A0F0EB62070609 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= \ No newline at end of file +SOURCE_FILENAME= diff --git a/scripts/_common.sh b/scripts/_common.sh index a9bf588..2541082 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1 +1,15 @@ #!/bin/bash + +# Execute a command as another user +# usage: exec_as USER COMMAND [ARG ...] +exec_as() { + local USER=$1 + shift 1 + + if [[ $USER = $(whoami) ]] + then + eval $@ + else + sudo -u "$USER" $@ + fi +} diff --git a/scripts/upgrade b/scripts/upgrade index c054c34..747f5a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,8 +103,6 @@ ynh_system_user_create "$app" # Create a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# GENERIC FINALIZATION #================================================= # SECURE FILES AND DIRECTORIES #=================================================