Commit 419c3a5c authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

fix cronjob filename

parent e86dc52d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -65,8 +65,14 @@ define patchman_client (
  ## or upgrade a package.
  include patchman_client::remove_aptconf

  # Install a cron job to update patchman periodically.
  file { "/etc/cron.daily/patchman-client-${patchman_server}":
  # Install a cron job to update patchman periodically. For the name of
  # the cron job we use "patchman-client-<patchman_server>" but we change
  # all the dots (".") in <patchman-server> to underscores ("_"). We do
  # this because run-parts (which cron uses) will only run scripts whose
  # filenames match /^[a-zA-Z0-9_-]+$/. See the man page for run-parts for
  # more information.
  $patchman_server_rp = regsubst($patchman_server, '[.]', '_', 'G')
  file { "/etc/cron.daily/patchman-client-${patchman_server_rp}":
    ensure  => $ensure,
    content => template('patchman_client/etc/cron.daily/patchman-client.erb'),
    mode    => '0755',