
This appears to be a still supported api for customizing things, http://etherpad.org/doc/v1.7.0/#index_custom_static_files, but the repo doesn't have a custom dir precreated for us. Ensure this directory is created before we try to write to it. Change-Id: I432d388cd43fc4e5dfc31115264365b15eb43215
53 lines
1.4 KiB
Puppet
53 lines
1.4 KiB
Puppet
# == Class: etherpad_lite::site
|
|
#
|
|
class etherpad_lite::site (
|
|
$database_password,
|
|
$etherpad_title,
|
|
$database_host = 'localhost',
|
|
$database_name = 'etherpad-lite',
|
|
$database_user = 'eplite',
|
|
$db_type = 'mysql',
|
|
$session_key = '',
|
|
) {
|
|
|
|
include ::etherpad_lite
|
|
|
|
$base = $etherpad_lite::base_install_dir
|
|
|
|
service { 'etherpad-lite':
|
|
ensure => running,
|
|
enable => true,
|
|
subscribe => File["${base}/etherpad-lite/settings.json"],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/settings.json":
|
|
ensure => present,
|
|
content => template('etherpad_lite/etherpad-lite_settings.json.erb'),
|
|
replace => true,
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0600',
|
|
require => Class['etherpad_lite'],
|
|
before => Service['etherpad-lite'],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/src/static/custom":
|
|
ensure => directory,
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0755',
|
|
require => Class['etherpad_lite'],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/src/static/custom/pad.js":
|
|
ensure => present,
|
|
source => 'puppet:///modules/etherpad_lite/pad.js',
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0644',
|
|
require => File["${base}/etherpad-lite/src/static/custom"],
|
|
before => Service['etherpad-lite'],
|
|
}
|
|
|
|
}
|