int serverMode = SLAP_SERVER_MODE;
int port = LDAP_PORT;
+#ifdef HAVE_TLS
int tls_port = LDAPS_PORT;
+#else
+ int tls_port = 0;
+#endif
g_argc = argc;
g_argv = argv;
openlog( serverName, OPENLOG_OPTIONS );
#endif
- slapd_daemon_init( urls, port, tls_port );
+ if( slapd_daemon_init( urls, port, tls_port ) != 0 ) {
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 16 );
+ goto stop;
+ }
#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
if ( username != NULL || groupname != NULL ) {