mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
fix
This commit is contained in:
parent
bc20346e6f
commit
96689d7a44
2 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue