aboutsummaryrefslogtreecommitdiffstats
path: root/roles/radicale
diff options
context:
space:
mode:
Diffstat (limited to 'roles/radicale')
-rw-r--r--roles/radicale/templates/config.j25
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/radicale/templates/config.j2 b/roles/radicale/templates/config.j2
index 182cad1..8b23cd8 100644
--- a/roles/radicale/templates/config.j2
+++ b/roles/radicale/templates/config.j2
@@ -65,9 +65,12 @@ type = owner_only
type = multifilesystem
filesystem_folder = {{ radicale.home }}
+{% if radicale.git %}
+{% set git = "/usr/local/bin/git" %}
# Command that is run after changes to storage
# See: http://radicale.org/versioning/
-hook = ([ -d .git ] || /usr/local/bin/git init) && /usr/local/bin/git add -A && (/usr/local/bin/git diff --cached --quiet || /usr/local/bin/git commit -m "Changes by %(user)s")
+hook = ([ -d .git ] || {{git}} init) && {{git}} add -A && ({{git}} diff --cached --quiet || {{git}} commit -m "Changes by %(user)s")
+{% endif %}
# Web interface backend