Commit 8890d6ea authored by Russ Allbery's avatar Russ Allbery
Browse files

Fix enabling of sites when the configuration file exists

Fix the exec in apache::site that calls a2ensite to always call it if
the symlink does not exist, rather than keying off of the existence of
the site configuration file.
parent 439c5467
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
UNRELEASED
release/001.005 (unreleased)

    None at this time.
    Fix the exec in apache::site that calls a2ensite to always call it if
    the symlink does not exist, rather than keying off of the existence of
    the site configuration file.  (rra)

release/001.004 (2014-03-26)

+2 −2
Original line number Diff line number Diff line
@@ -38,14 +38,14 @@ define apache::site(
  if ($ensure == 'present') {
    exec { "a2ensite ${name}":
      command => "a2ensite ${name}",
      creates => $realname,
      creates => "/etc/apache2/sites-enabled/${name}",
      require => [ Package['apache'], File[$realname] ],
      notify  => Exec['apache reload'],
    }
  } elsif ($ensure == 'absent') {
    exec { "a2dissite ${name}":
      command => "a2dissite ${name}",
      unless  => "[ ! -e ${realname} ]",
      unless  => "[ ! -e '/etc/apache2/sites-enabled/${name}' ]",
      require => Package['apache'],
      notify  => Exec['apache reload'],
    }