Changes

From SME Server
Jump to navigationJump to search
13 bytes removed ,  14:09, 5 January 2023
Line 209: Line 209:     
  mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/slapd
 
  mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/slapd
   
  nano /etc/e-smith/templates-custom/etc/sysconfig/slapd/40OPTIONS
 
  nano /etc/e-smith/templates-custom/etc/sysconfig/slapd/40OPTIONS
   −
+
Add this code:
    
  {
 
  {
   
  {
 
  {
   
  # Any custom options
 
  # Any custom options
   
  #SLAPD_OPTIONS=" -4 -d { $ldap{LogLevel} || 256 } -s 0 "
 
  #SLAPD_OPTIONS=" -4 -d { $ldap{LogLevel} || 256 } -s 0 "
   
  my $slapdOptions = "#Test";
 
  my $slapdOptions = "#Test";
   
  my $logLevel = $ldap{LogLevel} || 256;
 
  my $logLevel = $ldap{LogLevel} || 256;
   
  if ($IPv6{'status'} eq "enabled") {
 
  if ($IPv6{'status'} eq "enabled") {
   
      $slapdOptions = "SLAPD_OPTIONS=\"-d  $logLevel -s 0\" " ;
 
      $slapdOptions = "SLAPD_OPTIONS=\"-d  $logLevel -s 0\" " ;
   
      } else {
 
      } else {
   
      $slapdOptions = "SLAPD_OPTIONS=\"-4 -d $logLevel -s 0\" " ;
 
      $slapdOptions = "SLAPD_OPTIONS=\"-4 -d $logLevel -s 0\" " ;
   
  }
 
  }
   
  $OUT .= "# Any custom options\n";
 
  $OUT .= "# Any custom options\n";
   
  $OUT .= "$slapdOptions\n";
 
  $OUT .= "$slapdOptions\n";
   
  }
 
  }
    +
Edited the unit file /usr/lib/systemd/system/ldap.service to comment out the Environment line and just leave the config file
    +
#Environment="SLAPD_URLS=ldap:/// ldaps:/// ldapi:///" "SLAPD_OPTIONS=-4 -d 256 -s 0"
 +
EnvironmentFile=/etc/sysconfig/slapd
   −
Edited the unit file /usr/lib/systemd/system/ldap.service to comment out the Environment line and just leave the config file
+
  systemctl daemon-reload
  <code>#Environment="SLAPD_URLS=ldap:/// ldaps:/// ldapi:///" "SLAPD_OPTIONS=-4 -d 256 -s 0"
+
systemctl restart ldap.service
EnvironmentFile=/etc/sysconfig/slapd</code>
  −
systemctl daemon-reload
  −
 
  −
systemctl restart ldap.service
      
===Other notes===
 
===Other notes===

Navigation menu