1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
This commit is contained in:
ericgaspar 2020-09-17 10:25:34 +02:00
parent bc20346e6f
commit 96689d7a44
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 14 additions and 1 deletions

View file

@ -24,3 +24,16 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-curl php
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# Execute a command as another user
# usage: ynh_exec_as USER COMMAND [ARG ...]
ynh_exec_as() {
local USER=$1
shift 1
if [[ $USER = $(whoami) ]]; then
eval "$@"
else
sudo -u "$USER" "$@"
fi
}

View file

@ -183,7 +183,7 @@ ynh_add_systemd_config
# Set-up database and configuration
#=================================================
cd "$final_path"
php"${phpversion}" composer.phar $app:migrate
ynh_exec_as $app php"${phpversion}" composer.phar $app:migrate
# (
# cd "$final_path"