Set the uploads dir inside of /opt/ejabberd instead of /var/www

/var/www is intended for nginx/apache

I have copied over the old directories manually on Andromeda before
running this code

Fixes #80
This commit is contained in:
Greg Karékinian 2019-07-19 12:47:42 +02:00
parent f887a88e2d
commit 0fa9e6cbb7
3 changed files with 3 additions and 10 deletions

View File

@ -4,7 +4,7 @@ maintainer_email 'ops@kosmos.org'
license 'MIT'
description 'Installs/Configures kosmos-ejabberd'
long_description 'Installs/Configures kosmos-ejabberd'
version '0.1.0'
version '0.1.1'
chef_version '>= 12.14' if respond_to?(:chef_version)
# The `issues_url` points to the location where issues for this cookbook are

View File

@ -111,14 +111,7 @@ end
# Set permissions for the upload folders
%w(xmpp.kosmos.org xmpp.5apps.com).each do |domain|
directory "/var/www/#{domain}" do
owner "ejabberd"
group "ejabberd"
mode 0750
recursive true
end
directory "/var/www/#{domain}/uploads" do
directory "/opt/ejabberd/uploads/#{domain}" do
owner "ejabberd"
group "ejabberd"
mode 0750

View File

@ -208,7 +208,7 @@ modules:
urls: ["mailto:abuse@@HOST@"]
mod_bosh: {}
mod_http_upload:
docroot: "/var/www/xmpp.@HOST@/uploads/"
docroot: "/opt/ejabberd/uploads/xmpp.@HOST@/"
put_url: "https://xmpp.@HOST@:5443/upload"
thumbnail: false # otherwise needs the identify command from ImageMagick installed
mod_last: {}