From 23f0e1561767dd8a396188e317bae5920d171ea8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 16 Aug 2015 16:38:25 +0200 Subject: Initial import of my nikola website --- files/arts/software/etherpad/etherpad | 35 ++++++++++++++++ files/arts/software/etherpad/nginx-etherpad.conf | 25 +++++++++++ files/arts/software/etherpad/nginx.conf | 53 ++++++++++++++++++++++++ files/arts/software/etherpad/soffice | 28 +++++++++++++ 4 files changed, 141 insertions(+) create mode 100755 files/arts/software/etherpad/etherpad create mode 100644 files/arts/software/etherpad/nginx-etherpad.conf create mode 100644 files/arts/software/etherpad/nginx.conf create mode 100755 files/arts/software/etherpad/soffice (limited to 'files/arts/software/etherpad') diff --git a/files/arts/software/etherpad/etherpad b/files/arts/software/etherpad/etherpad new file mode 100755 index 0000000..78ceebb --- /dev/null +++ b/files/arts/software/etherpad/etherpad @@ -0,0 +1,35 @@ +#!/bin/sh +# + +# PROVIDE: etherpad +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable etherpad: +# +# etherpad_enable="YES" +# + +. /etc/rc.subr + +name="etherpad" +rcvar=${name}_enable + +start_cmd="${name}_start" +#stop_cmd="${name}_stop" + +load_rc_config $name + +etherpad_user="etherpad" +#procname="java" +procname="/usr/local/jdk1.6.0/bin/java" + +pidfile=/var/run/etherpad/etherpad.pid +daemon_args=" -f -u ${etherpad_user} -p ${pidfile} /usr/local/pad/etherpad/bin/run-local.sh" +etherpad_start() +{ + cd /usr/local/pad/etherpad/ + /usr/sbin/daemon ${daemon_args} +} + +run_rc_command "$1" diff --git a/files/arts/software/etherpad/nginx-etherpad.conf b/files/arts/software/etherpad/nginx-etherpad.conf new file mode 100644 index 0000000..d8f90dd --- /dev/null +++ b/files/arts/software/etherpad/nginx-etherpad.conf @@ -0,0 +1,25 @@ +server_name pads.domain.tld *.pads.domain.tld; +access_log /var/log/www/access.log; +error_log /var/log/www/error.log; + +proxy_redirect off; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +client_max_body_size 10m; +client_body_buffer_size 128k; +proxy_connect_timeout 90; +proxy_send_timeout 90; +proxy_read_timeout 90; +proxy_buffer_size 4k; +proxy_buffers 4 32k; +proxy_busy_buffers_size 64k; +proxy_temp_file_write_size 64k; + +location /sitemap.xml { + rewrite /sitemap.xml$ /ep/tag/?format=sitemap permanent; +} + +location / { + proxy_pass http://pads.domain.tld:9000/; +} diff --git a/files/arts/software/etherpad/nginx.conf b/files/arts/software/etherpad/nginx.conf new file mode 100644 index 0000000..79d93d5 --- /dev/null +++ b/files/arts/software/etherpad/nginx.conf @@ -0,0 +1,53 @@ +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + server_name pads.domain.tld *.pads.domain.tld; + include nginx-etherpad.conf; + } + + server { + listen 443; + + ssl on; + ssl_certificate pads.domain.tld.pem; + ssl_certificate_key pads.domain.tld.pem; + + ssl_session_timeout 5m; + + ssl_protocols SSLv2 SSLv3 TLSv1; + ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; + ssl_prefer_server_ciphers on; + include nginx-etherpad.conf; + } +} + diff --git a/files/arts/software/etherpad/soffice b/files/arts/software/etherpad/soffice new file mode 100755 index 0000000..dc83499 --- /dev/null +++ b/files/arts/software/etherpad/soffice @@ -0,0 +1,28 @@ +#!/bin/sh +# + +# PROVIDE: soffice +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable etherpad: +# +# soffice_enable="YES" +# + +. /etc/rc.subr + +name="soffice" +rcvar=${name}_enable + +start_cmd="${name}_start" +#stop_cmd="${name}_stop" + +load_rc_config $name + +soffice_start() +{ + /usr/sbin/daemon -f /usr/local/bin/soffice -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service" -nologo +} + +run_rc_command "$1" -- cgit v1.2.3