diff options
author | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
---|---|---|
committer | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
commit | 23f0e1561767dd8a396188e317bae5920d171ea8 (patch) | |
tree | a67f44e39ad8a45e42d60634488a65c37f3ad432 /files/arts/software/etherpad |
Initial import of my nikola website
Diffstat (limited to 'files/arts/software/etherpad')
-rwxr-xr-x | files/arts/software/etherpad/etherpad | 35 | ||||
-rw-r--r-- | files/arts/software/etherpad/nginx-etherpad.conf | 25 | ||||
-rw-r--r-- | files/arts/software/etherpad/nginx.conf | 53 | ||||
-rwxr-xr-x | files/arts/software/etherpad/soffice | 28 |
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 | |||
15 | name="etherpad" | ||
16 | rcvar=${name}_enable | ||
17 | |||
18 | start_cmd="${name}_start" | ||
19 | #stop_cmd="${name}_stop" | ||
20 | |||
21 | load_rc_config $name | ||
22 | |||
23 | etherpad_user="etherpad" | ||
24 | #procname="java" | ||
25 | procname="/usr/local/jdk1.6.0/bin/java" | ||
26 | |||
27 | pidfile=/var/run/etherpad/etherpad.pid | ||
28 | daemon_args=" -f -u ${etherpad_user} -p ${pidfile} /usr/local/pad/etherpad/bin/run-local.sh" | ||
29 | etherpad_start() | ||
30 | { | ||
31 | cd /usr/local/pad/etherpad/ | ||
32 | /usr/sbin/daemon ${daemon_args} | ||
33 | } | ||
34 | |||
35 | 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 @@ | |||
1 | server_name pads.domain.tld *.pads.domain.tld; | ||
2 | access_log /var/log/www/access.log; | ||
3 | error_log /var/log/www/error.log; | ||
4 | |||
5 | proxy_redirect off; | ||
6 | proxy_set_header Host $host; | ||
7 | proxy_set_header X-Real-IP $remote_addr; | ||
8 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
9 | client_max_body_size 10m; | ||
10 | client_body_buffer_size 128k; | ||
11 | proxy_connect_timeout 90; | ||
12 | proxy_send_timeout 90; | ||
13 | proxy_read_timeout 90; | ||
14 | proxy_buffer_size 4k; | ||
15 | proxy_buffers 4 32k; | ||
16 | proxy_busy_buffers_size 64k; | ||
17 | proxy_temp_file_write_size 64k; | ||
18 | |||
19 | location /sitemap.xml { | ||
20 | rewrite /sitemap.xml$ /ep/tag/?format=sitemap permanent; | ||
21 | } | ||
22 | |||
23 | location / { | ||
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; | ||
2 | worker_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 | |||
10 | events { | ||
11 | worker_connections 1024; | ||
12 | } | ||
13 | |||
14 | http { | ||
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 | |||
15 | name="soffice" | ||
16 | rcvar=${name}_enable | ||
17 | |||
18 | start_cmd="${name}_start" | ||
19 | #stop_cmd="${name}_stop" | ||
20 | |||
21 | load_rc_config $name | ||
22 | |||
23 | soffice_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 | |||
28 | run_rc_command "$1" | ||