mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
[fix] add sudo for exec_as function & delete sudo or exec_composer
This commit is contained in:
parent
1a0ebf97ff
commit
6a7631aaaf
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ exec_as() {
|
||||||
eval $@
|
eval $@
|
||||||
else
|
else
|
||||||
# use sudo twice to be root and be allowed to use another user
|
# use sudo twice to be root and be allowed to use another user
|
||||||
sudo -u "$USER" $@
|
sudo sudo -u "$USER" $@
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ exec_composer() {
|
||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
exec_as "$AS_USER" COMPOSER_HOME="${WORKDIR}/.composer" \
|
exec_as "$AS_USER" COMPOSER_HOME="${WORKDIR}/.composer" \
|
||||||
sudo php "${WORKDIR}/composer.phar" $@ \
|
php "${WORKDIR}/composer.phar" $@ \
|
||||||
-d "${WORKDIR}" --quiet --no-interaction
|
-d "${WORKDIR}" --quiet --no-interaction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ init_composer() {
|
||||||
local AS_USER=${2:-admin}
|
local AS_USER=${2:-admin}
|
||||||
|
|
||||||
# install composer
|
# install composer
|
||||||
sudo curl -sS https://getcomposer.org/installer \
|
curl -sS https://getcomposer.org/installer \
|
||||||
| exec_as "$AS_USER" COMPOSER_HOME="${DESTDIR}/.composer" \
|
| exec_as "$AS_USER" COMPOSER_HOME="${DESTDIR}/.composer" \
|
||||||
php -- --quiet --install-dir="$DESTDIR" \
|
php -- --quiet --install-dir="$DESTDIR" \
|
||||||
|| ynh_die "Unable to install Composer"
|
|| ynh_die "Unable to install Composer"
|
||||||
|
|
Loading…
Reference in a new issue