fix: Prevents salt-api user creation if already exists
This commit is contained in:
@@ -189,8 +189,10 @@ function configure_salt_api()
|
|||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating '${SALT_API_USER}' user for salt-api ..."
|
if ! id -u "${SALT_API_USER}" &>/dev/null; then
|
||||||
adduser --quiet --disabled-password --gecos "Salt API" "${SALT_API_USER}"
|
echo "Creating '${SALT_API_USER}' user for salt-api ..."
|
||||||
|
adduser --quiet --disabled-password --gecos "Salt API" "${SALT_API_USER}"
|
||||||
|
fi
|
||||||
echo "${SALT_API_USER}:${SALT_API_USER_PASS}" | chpasswd
|
echo "${SALT_API_USER}:${SALT_API_USER_PASS}" | chpasswd
|
||||||
unset SALT_API_USER_PASS
|
unset SALT_API_USER_PASS
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user