summaryrefslogtreecommitdiff
path: root/files/arts/software/etherpad
diff options
context:
space:
mode:
Diffstat (limited to 'files/arts/software/etherpad')
-rwxr-xr-xfiles/arts/software/etherpad/etherpad35
-rw-r--r--files/arts/software/etherpad/nginx-etherpad.conf25
-rw-r--r--files/arts/software/etherpad/nginx.conf53
-rwxr-xr-xfiles/arts/software/etherpad/soffice28
4 files changed, 141 insertions, 0 deletions
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 @@
1#!/bin/sh
2#
3
4# PROVIDE: etherpad
5# REQUIRE: LOGIN
6# KEYWORD: shutdown
7#
8# Add the following line to /etc/rc.conf to enable etherpad:
9#
10# etherpad_enable="YES"
11#
12
13. /etc/rc.subr
14
15name="etherpad"
16rcvar=${name}_enable
17
18start_cmd="${name}_start"
19#stop_cmd="${name}_stop"
20
21load_rc_config $name
22
23etherpad_user="etherpad"
24#procname="java"
25procname="/usr/local/jdk1.6.0/bin/java"
26
27pidfile=/var/run/etherpad/etherpad.pid
28daemon_args=" -f -u ${etherpad_user} -p ${pidfile} /usr/local/pad/etherpad/bin/run-local.sh"
29etherpad_start()
30{
31 cd /usr/local/pad/etherpad/
32 /usr/sbin/daemon ${daemon_args}
33}
34
35run_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 @@
1server_name pads.domain.tld *.pads.domain.tld;
2access_log /var/log/www/access.log;
3error_log /var/log/www/error.log;
4
5proxy_redirect off;
6proxy_set_header Host $host;
7proxy_set_header X-Real-IP $remote_addr;
8proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
9client_max_body_size 10m;
10client_body_buffer_size 128k;
11proxy_connect_timeout 90;
12proxy_send_timeout 90;
13proxy_read_timeout 90;
14proxy_buffer_size 4k;
15proxy_buffers 4 32k;
16proxy_busy_buffers_size 64k;
17proxy_temp_file_write_size 64k;
18
19location /sitemap.xml {
20 rewrite /sitemap.xml$ /ep/tag/?format=sitemap permanent;
21}
22
23location / {
24 proxy_pass http://pads.domain.tld:9000/;
25}
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 @@
1#user nobody;
2worker_processes 1;
3
4#error_log logs/error.log;
5#error_log logs/error.log notice;
6#error_log logs/error.log info;
7
8#pid logs/nginx.pid;
9
10events {
11 worker_connections 1024;
12}
13
14http {
15 include mime.types;
16 default_type application/octet-stream;
17
18 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19 # '$status $body_bytes_sent "$http_referer" '
20 # '"$http_user_agent" "$http_x_forwarded_for"';
21
22 #access_log logs/access.log main;
23
24 sendfile on;
25 #tcp_nopush on;
26
27 #keepalive_timeout 0;
28 keepalive_timeout 65;
29
30 #gzip on;
31
32 server {
33 listen 80;
34 server_name pads.domain.tld *.pads.domain.tld;
35 include nginx-etherpad.conf;
36 }
37
38 server {
39 listen 443;
40
41 ssl on;
42 ssl_certificate pads.domain.tld.pem;
43 ssl_certificate_key pads.domain.tld.pem;
44
45 ssl_session_timeout 5m;
46
47 ssl_protocols SSLv2 SSLv3 TLSv1;
48 ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
49 ssl_prefer_server_ciphers on;
50 include nginx-etherpad.conf;
51 }
52}
53
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 @@
1#!/bin/sh
2#
3
4# PROVIDE: soffice
5# REQUIRE: LOGIN
6# KEYWORD: shutdown
7#
8# Add the following line to /etc/rc.conf to enable etherpad:
9#
10# soffice_enable="YES"
11#
12
13. /etc/rc.subr
14
15name="soffice"
16rcvar=${name}_enable
17
18start_cmd="${name}_start"
19#stop_cmd="${name}_stop"
20
21load_rc_config $name
22
23soffice_start()
24{
25 /usr/sbin/daemon -f /usr/local/bin/soffice -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service" -nologo
26}
27
28run_rc_command "$1"