summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-09 14:19:48 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-09 14:19:48 +0200
commit398a7a875b6f48919ea411834cf5fc7a389fa086 (patch)
tree9f3e532615fcc25b6834679b53e59a7f15e92bed
Initial setup.
-rwxr-xr-xbin/vdirsyncer16
-rw-r--r--config.in36
2 files changed, 52 insertions, 0 deletions
diff --git a/bin/vdirsyncer b/bin/vdirsyncer
new file mode 100755
index 0000000..6ae3cb1
--- /dev/null
+++ b/bin/vdirsyncer
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -eu
+
+BASEDIR="$(dirname "$0")/.."
+
+ACTION=${1:-sync}
+
+export VDIRSYNCER_CONFIG="$BASEDIR/config"
+
+if [ ! -e "$BASEDIR/config" ]; then
+ sed -e 's,@@BASEDIR@@,~/FOO,g' "$BASEDIR/config.in" > "$BASEDIR/config"
+ /usr/bin/vdirsyncer discover
+fi
+
+/usr/bin/vdirsyncer "$ACTION"
diff --git a/config.in b/config.in
new file mode 100644
index 0000000..452a717
--- /dev/null
+++ b/config.in
@@ -0,0 +1,36 @@
+[general]
+status_path = "@@BASEDIR@@/status/"
+
+[pair homebase_contacts]
+a = "homebase_contacts_local"
+b = "homebase_contacts_jawa"
+collections = ["from a", "from b"]
+metadata = ["displayname"]
+
+[pair homebase_calendar]
+a = "homebase_calendar_local"
+b = "homebase_calendar_jawa"
+collections = ["from a", "from b"]
+metadata = ["displayname", "color"]
+
+[storage homebase_contacts_local]
+type = "filesystem"
+path = "@@BASEDIR@@/contacts/"
+fileext = ".vcf"
+
+[storage homebase_calendar_local]
+type = "filesystem"
+path = "@@BASEDIR@@/calendars/"
+fileext = ".ics"
+
+[storage homebase_contacts_jawa]
+type = "carddav"
+url = "https://event.homebase.dk:8443/principals/__uids__/e7e7ee1e-4f0a-5e2b-a42d-01c943bdc8bb/"
+username = "kpstaff"
+password.fetch = ["prompt", "Password for homebase CalDAV"]
+
+[storage homebase_calendar_jawa]
+type = "caldav"
+url = "https://event.homebase.dk:8443/principals/__uids__/e7e7ee1e-4f0a-5e2b-a42d-01c943bdc8bb/"
+username = "kpstaff"
+password.fetch = ["prompt", "Password for homebase CalDAV"]