mirror of https://github.com/zulip/zulip.git
puppet: Create memcached PID file that systemd config file specifies.
The systemd config file installed by the `memcached` package assumes there will be a PID written to `/run/memcached/memcached.pid`. Since we override `memcached.conf`, we have omitted the line that writes out the PID to this file. Systemd is smart enough to not _need_ the PID file to start up the service correctly, but match the configuration. We create the directory since the package does not do so. It is created as `/run/memcached` and not `/var/run/memcached` because `/var/run` is a symlink to `/run`.
This commit is contained in:
parent
16db496871
commit
a6c2079502
|
@ -99,9 +99,16 @@ Environment=SASL_CONF_PATH=/etc/sasl2
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
content => template('zulip/memcached.conf.template.erb'),
|
content => template('zulip/memcached.conf.template.erb'),
|
||||||
}
|
}
|
||||||
|
file { '/run/memcached':
|
||||||
|
ensure => 'directory',
|
||||||
|
owner => 'memcache',
|
||||||
|
group => 'memcache',
|
||||||
|
mode => '0755',
|
||||||
|
require => Package[$memcached_packages],
|
||||||
|
}
|
||||||
service { 'memcached':
|
service { 'memcached':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
subscribe => File['/etc/memcached.conf'],
|
subscribe => File['/etc/memcached.conf'],
|
||||||
require => Class['zulip::systemd_daemon_reload'];
|
require => [File['/run/memcached'], Class['zulip::systemd_daemon_reload']],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,5 +46,8 @@ logfile /var/log/memcached.log
|
||||||
# Maximize core file limit
|
# Maximize core file limit
|
||||||
# -r
|
# -r
|
||||||
|
|
||||||
|
# Use a pidfile
|
||||||
|
-P /var/run/memcached/memcached.pid
|
||||||
|
|
||||||
# Enable SASL authentication
|
# Enable SASL authentication
|
||||||
-S
|
-S
|
||||||
|
|
Loading…
Reference in New Issue