3 [[ $EUID == 0 ]] ||
exec sudo
-E "$BASH_SOURCE" "$@"
6 # davdroid setup instructions at the bottom
9 # http://radicale.org/user_documentation/
10 # https://davdroid.bitfire.at/configuration/
12 # note on debugging: if radicale can't bind to the address,
13 # in the log it just says "Starting Radicale". If you run
14 # it in the foreground, it will give more info. Background
15 # plus debug does not help.
16 # sudo -u radicale radicale -D -f
18 # created password file with:
19 # htpasswd -c /etc/davpass dav
21 d
=/etc
/systemd
/system
/radicale.service.d
23 sudo
dd of
=$d/override.conf
<<'EOF'
25 # this unit is configured to start and stop whenever openvpn-client@mail.service
28 BindsTo=openvpn-client@mail.service
29 After=openvpn-client@mail.service
32 RequiredBy=openvpn-client@mail.service
34 ser daemon-reload
# not sure this is needed
38 # I moved /var/lib/radicale after it's initialization.
39 # I did a sudo -u radicale git init in the collections subfolder
40 # after it gets created, per the git docs.
41 lnf
-T /o
/radicale
/var
/lib
/radicale
43 # from https://www.williamjbowman.com/blog/2015/07/24/setting-up-webdav-caldav-and-carddav-servers/
45 # more config is for li in distro-end
47 # coment in this file says this is needed for it to run on startup
48 sed -ri 's/^\s*#+\s*(ENABLE_RADICALE\s*=\s*yes\s*)/\1/' /etc
/default
/radicale
51 key
="$1" value
="$2" section
="$3"
52 file="/etc/radicale/config"
53 sed -ri "/ *\[$section\]/,/^ *\[[^]]+\]/{/^\s*$key[[:space:]=]/d};/ *\[$section\]/a $key = $value" "$file"
56 # comments say default is 0.0.0.0:5232
57 setini hosts
10.8.0.4:5232 server
59 if [[ $HOSTNAME == $MAIL_HOST ]]; then
63 # disable power management feature, set to 240 min sync interval,
64 # so it shouldn't be bad.
66 # davdroid from f-druid.
67 # login with url and user name
69 # url https://cal.iankelling.org
71 # pass, see password manager
75 # set account name as ian@iankelling.org, per help text below the
78 # switch to groups are per-contact categories,
79 # per https://davdroid.bitfire.at/configuration/radicale/
82 # After setting up account, I added one address book, named
83 # ianaddr. calender was already created, named ian. checked boxes under
86 # To restore from old phone to new phone, I wiped all data out, then copied over the newly created files. I think
88 # ignorable background info:
90 # opentasks uses the calendar file.
92 # The address book I created got a uuid as a name for the file. Note
93 # the .props file says if it's a calendar or addressbook.
95 # When debugging, tailed /var/log/radicale/radicale.log and apache log,
96 # both show the requests happening. Without creating the address book,
97 # after creating a contact, a sync would delete it.
99 # Address books correspond to .props files in the radicale dir.
101 # Some background is here,
102 # https://davdroid.bitfire.at/faq/entry/cant-manage-groups-on-device/
103 # which shows separate vcard option is from rfc 6350, the other is 2426,
104 # radicale page says it implements the former not the latter,
105 # which conflicts with the documentation of which to select, but whatever.
106 # http://radicale.org/technical_choices/
107 # https://davdroid.bitfire.at/faq/entry/cant-manage-groups-on-device/
109 # Note, url above says only cayanogenmod 13+ and omnirom can manage groups.
111 # Note, radicale had built-in git support to track changes, but they