Make the docker group check BSD compatible

This commit is contained in:
Thomas Büttner 2019-01-24 15:24:04 +01:00
parent cc3b1e5cc8
commit f2d0d1f646
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ package_temporary_dir="`pwd`/pkg-dist-tmp"
pkg_src_dir="`pwd`/pkg-src"
image_name="jellyfin-rpmbuild"
docker_sudo=""
if ! $(id -Gn | grep -q 'docker') && [ ! $EUID -eq 0 ]; then
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && [ ! $USER == "root" ]; then
docker_sudo=sudo
fi

View File

@ -19,7 +19,7 @@ pkg_src_dir="`pwd`/pkg-src"
current_user="`whoami`"
image_name="jellyfin-rpmbuild"
docker_sudo=""
if ! $(id -Gn | grep -q 'docker') && [ ! $EUID -eq 0 ]; then
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && [ ! $USER == "root" ]; then
docker_sudo=sudo
fi