Puppet Class: ttrss::updater

Inherits:
ttrss
Defined in:
manifests/updater.pp

Overview

enables the update_daemon2.php as a systemd service



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/updater.pp', line 4

class ttrss::updater inherits ttrss {
  if($ttrss::enable_update_service) {
    package { $ttrss::updater_php_extensions:
      ensure => present
    }

    file { "${::ttrss::params::systemd_unit_path}/ttrss-update.service":
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      content => epp('ttrss/ttrss-update.epp'),
      before  => Service['ttrss-update'],
    }

    exec { 'systemctl-daemon-reload':
      path        => '/bin:/sbin:/usr/bin:/usr/sbin',
      command     => 'systemctl daemon-reload',
      subscribe   => File["${::ttrss::params::systemd_unit_path}/ttrss-update.service"],
      refreshonly => true,
    }

    service { 'ttrss-update':
      ensure => 'running',
    }
  }
}