#!/bin/bash -l [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" # davdroid setup instructions at the bottom # main docs: # http://radicale.org/user_documentation/ # https://davdroid.bitfire.at/configuration/ # created password file with: # htpasswd -c /etc/nginx/caldav/htpasswd ian # python-dulwich, to track changes with git, per # http://radicale.org/user_documentation/#idgit-support pi nginx python-dulwich radicale # I moved /var/lib/radicale after it's initialization. # I did a sudo -u radicale git init in the collections subfolder # after it gets created, per the git docs. lnf -T /o/radicale /var/lib/radicale # from https://www.williamjbowman.com/blog/2015/07/24/setting-up-webdav-caldav-and-carddav-servers/ # more config is for li in distro-end # coment in this file says this is needed for it to run on startup sed -ri 's/^\s*#+\s*(ENABLE_RADICALE\s*=\s*yes\s*)/\1/' /etc/default/radicale sgo radicale setini() { key="$1" value="$2" section="$3" file="/etc/radicale/config" sed -ri "/ *\[$section\]/,/^ *\[[^]]+\]/{/^\s*$key[[:space:]=]/d};/ *\[$section\]/a $key = $value" "$file" } # comments say default is 0.0.0.0:5232 setini hosts 10.8.0.1:5232 server # davdroid from f-droid. username ian, # url https://iank.pw/radicale/ian. # I disabled power management feature, it's got 240 min sync interval, # so it shouldn't be bad. # # when setting up davdroid, switch to groups are per-contact categories, # per https://davdroid.bitfire.at/configuration/radicale/ # # set account name as ian@iankelling.org, per help text below the # field. # # After setting up account, I added one address book, named # ian. calender was already created, named ian. checked boxes under # both. synced. # # ignorable background info: # # When debugging, tailed /var/log/radicale/radicale.log and nginx log, # both show the requests happening. Without creating the address book, # after creating a contact, a sync would delete it. # # Address books correspond to .props files in the radicale dir. # # Some background is here, # https://davdroid.bitfire.at/faq/entry/cant-manage-groups-on-device/ # which shows separate vcard option is from rfc 6350, the other is 2426, # radicale page says it implements the former not the latter, # which conflicts with the documentation of which to select, but whatever. # http://radicale.org/technical_choices/ # https://davdroid.bitfire.at/faq/entry/cant-manage-groups-on-device/ # # Note, url above says only cayanogenmod 13+ and omnirom can manage groups.