From 2257feaa201b247c604718e45bd296cac49daad9 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 15 Oct 2018 17:04:32 -0700 Subject: [PATCH] Ensure the custom js dir is created 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 --- manifests/site.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index f16b652..92f9244 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -31,13 +31,21 @@ class etherpad_lite::site ( 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 => Class['etherpad_lite'], + require => File["${base}/etherpad-lite/src/static/custom"], before => Service['etherpad-lite'], }