Rename MAYAN_USER_GUID variable to MAYAN_USER_GID

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-08-23 03:42:22 -04:00
parent 2af136356d
commit 2f6cfcbc4f
4 changed files with 11 additions and 7 deletions

View File

@@ -6,10 +6,10 @@ INSTALL_FLAG=/var/lib/mayan/system/SECRET_KEY
CONCURRENCY_ARGUMENT=--concurrency=
DEFAULT_USER_UID=1000
DEFAULT_USER_GUID=1000
DEFAULT_USER_GID=1000
MAYAN_USER_UID=${MAYAN_USER_UID:-${DEFAULT_USER_UID}}
MAYAN_USER_GUID=${MAYAN_USER_GUID:-${DEFAULT_USER_GUID}}
MAYAN_USER_GID=${MAYAN_USER_GID:-${DEFAULT_USER_GID}}
export MAYAN_DEFAULT_BROKER_URL=redis://127.0.0.1:6379/0
export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0
@@ -35,10 +35,10 @@ MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1}
update_uid_gid() {
echo "mayan: update_uid_gid()"
groupmod mayan -g ${MAYAN_USER_GUID} 2>/dev/null || true
usermod mayan -u ${MAYAN_USER_UID} -g ${MAYAN_USER_GUID} 2>/dev/null
groupmod mayan -g ${MAYAN_USER_GID} 2>/dev/null || true
usermod mayan -u ${MAYAN_USER_UID} -g ${MAYAN_USER_GID} 2>/dev/null
if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GUID} -ne ${DEFAULT_USER_GUID} ]; then
if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GID} -ne ${DEFAULT_USER_GID} ]; then
echo "mayan: Updating file ownership. This might take a while if there are many documents."
chown mayan:mayan ${MAYAN_INSTALL_DIR} ${MAYAN_STATIC_ROOT} ${MAYAN_MEDIA_ROOT}
fi