Merge pull request #84 from YunoHost/helper-user-exists

[enh] Add ynh_user_exists helper.
This commit is contained in:
julienmalik 2015-09-03 14:45:23 +02:00
commit 4a4ac5f233

5
data/apps/helpers.d/user Normal file
View file

@ -0,0 +1,5 @@
# Check if a user exists
ynh_user_exists() {
sudo yunohost user list --json | grep -q "\"username\": \"${1}\""
}