|
@@ -16,6 +16,7 @@ setup_ldap_source() {
|
|
now=$(date +%s)
|
|
now=$(date +%s)
|
|
|
|
|
|
# Get the existing LDAP source status. This allows the user to disable LDAP
|
|
# Get the existing LDAP source status. This allows the user to disable LDAP
|
|
|
|
+ # Note that this method is deprecated since this app now supports optionalSso
|
|
ldap_status=$(mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
|
ldap_status=$(mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
|
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
|
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
|
|
|
|
|
@@ -100,7 +101,9 @@ mkdir -p /app/data/repository /app/data/ssh
|
|
|
|
|
|
chown -R git:git /app/data /run/gogs
|
|
chown -R git:git /app/data /run/gogs
|
|
|
|
|
|
-( setup_ldap_source ) &
|
|
|
|
|
|
+if [[ -n "${LDAP_SERVER:-}" ]]; then
|
|
|
|
+ ( setup_ldap_source ) &
|
|
|
|
+fi
|
|
|
|
|
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs
|
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs
|
|
|
|
|