Compare commits
2 commits
888dd7bab7
...
8e9e6d37fc
Author | SHA1 | Date | |
---|---|---|---|
Ludwig Behm | 8e9e6d37fc | ||
Ludwig Behm | 01fcc976ba |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
events.json
|
5
bin/calendar-events-exporter.sh
Executable file
5
bin/calendar-events-exporter.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
curl -sH "Accept: application/calendar+json" "https://cloud.kraut.space/remote.php/dav/public-calendars/2EkPGt3PF6WwYsA3?export&expand=1&start=$(date -d "" +%s)&end=$(date -d "next month" +%s)" \
|
||||
| jq -r '.[2] | map({_type: .[0]} + (.[1] | map({key: .[0], value: .[3]}) | from_entries))' \
|
||||
> ./events.json
|
123
etc/nginx/kraut.space.conf
Normal file
123
etc/nginx/kraut.space.conf
Normal file
|
@ -0,0 +1,123 @@
|
|||
server {
|
||||
listen 0.0.0.0:80;
|
||||
listen [::]:80;
|
||||
server_name kraut.space www.kraut.space;
|
||||
|
||||
access_log /var/log/nginx/kraut.space_access.log ano;
|
||||
error_log /var/log/nginx/kraut.space_error.log;
|
||||
|
||||
include /etc/nginx/letsencrypt.conf;
|
||||
|
||||
error_page 404 =301 https://wiki.kraut.space$request_uri;
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri?;
|
||||
}
|
||||
|
||||
location /chaostreff {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /lug {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /plenum {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /btw {
|
||||
return 301 https://auth.kabi.tk/index.php/apps/bbb/b/d8Er44TQYC9BJYmp;
|
||||
}
|
||||
location /nocovid {
|
||||
return 301 https://wiki.kraut.space/blog:content:vortrag_von_viola_priesemann;
|
||||
}
|
||||
location /brettspielerei {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:brettspielerei;
|
||||
}
|
||||
location /gamingamfreitag {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:gaming;
|
||||
}
|
||||
location /kinderbasteln {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:kinderbasteln;
|
||||
}
|
||||
location /iran {
|
||||
return 301 https://wiki.kraut.space/blog:content:about_the_current_situation_in_iran_-_report_and_insight_by_locals_and_q_a_live_from_tehran;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
ssl_certificate /var/lib/dehydrated/certs/kraut.space/fullchain.pem;
|
||||
ssl_certificate_key /var/lib/dehydrated/certs/kraut.space/privkey.pem;
|
||||
server_name kraut.space www.kraut.space;
|
||||
|
||||
access_log /var/log/nginx/kraut.space_access.log ano;
|
||||
error_log /var/log/nginx/kraut.space_error.log;
|
||||
|
||||
add_header Strict-Transport-Security max-age=15768000; # six months
|
||||
|
||||
include /etc/nginx/letsencrypt.conf;
|
||||
|
||||
if ($host = www.kraut.space) {
|
||||
return 301 https://wiki.kraut.space$request_uri;
|
||||
}
|
||||
|
||||
root /var/www/kraut.space/public/;
|
||||
|
||||
# falls es mal (global) an sein sollte
|
||||
autoindex off;
|
||||
index index.php;
|
||||
client_max_body_size 15M;
|
||||
client_body_buffer_size 128k;
|
||||
|
||||
location = /robots.txt { log_not_found off; }
|
||||
location = /favicon.ico { log_not_found off; }
|
||||
location ~ /\. { deny all; }
|
||||
location ~ ~$ { deny all; }
|
||||
|
||||
error_page 404 =301 http://wiki.kraut.space$request_uri;
|
||||
|
||||
location /chaostreff {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /lug {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /plenum {
|
||||
return 301 https://kabi.blue/join/krautspace;
|
||||
}
|
||||
location /btw {
|
||||
return 301 https://auth.kabi.tk/index.php/apps/bbb/b/d8Er44TQYC9BJYmp;
|
||||
}
|
||||
location /nocovid {
|
||||
return 301 https://wiki.kraut.space/blog:content:vortrag_von_viola_priesemann;
|
||||
}
|
||||
location /brettspielerei {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:brettspielerei;
|
||||
}
|
||||
location /gamingamfreitag {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:gaming;
|
||||
}
|
||||
location /kinderbasteln {
|
||||
return 301 https://wiki.kraut.space/hswiki:veranstaltungen:regelmaessige:kinderbasteln;
|
||||
}
|
||||
location /iran {
|
||||
return 301 https://wiki.kraut.space/blog:content:about_the_current_situation_in_iran_-_report_and_insight_by_locals_and_q_a_live_from_tehran;
|
||||
}
|
||||
|
||||
# führe PHP-Script aus
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass unix:/etc/alternatives/php-fpm.sock;
|
||||
# entferne Header "X-Powered-By: PHP/5.4.40-1~dotdeb+wheezy.1"
|
||||
fastcgi_hide_header "X-Powered-By";
|
||||
fastcgi_read_timeout 120;
|
||||
}
|
||||
|
||||
include snippets/xmpp.conf;
|
||||
include snippets/chat2.conf;
|
||||
include snippets/chat1.conf;
|
||||
}
|
12
etc/systemd/calendar-events-exporter.service
Normal file
12
etc/systemd/calendar-events-exporter.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Dumps calendar events from nextcloud into usable json
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/bash /var/www/kraut.space/bin/calendar-events-exporter.sh
|
||||
|
||||
User=www-data
|
||||
Group=www-data
|
||||
|
||||
WorkingDirectory=/var/www/kraut.space
|
9
etc/systemd/calendar-events-exporter.timer
Normal file
9
etc/systemd/calendar-events-exporter.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=timer for automatic refresh of calendar export
|
||||
|
||||
[Timer]
|
||||
# execute at the second minute of every hour, and repeat every 5 minutes
|
||||
OnCalendar=*:2/5
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in a new issue