[enh] Automatically create user vagrant in use-git yunohost-admin (e.g. when running in a VPS)

This commit is contained in:
Alexandre Aubin 2016-11-26 21:24:56 -05:00
parent 7a05e9222c
commit c93cd6186a

View file

@ -251,6 +251,13 @@ elif [ "$1" = "use-git" ]; then
;; ;;
yunohost-admin) yunohost-admin)
# Trick to check vagrant user exists (for install on VPS..)
getent passwd vagrant > /dev/null
if [ $? -eq 2 ]; then
useradd vagrant
chown -R vagrant: /vagrant/yunohost-admin
fi
# Install npm dependencies if needed # Install npm dependencies if needed
which gulp > /dev/null which gulp > /dev/null
if [ $? -eq 1 ] if [ $? -eq 1 ]