From: Ian Kelling Date: Mon, 3 Apr 2017 03:55:09 +0000 (-0700) Subject: make radicale setup vpned X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=69c1f384f54bba59a693c4ac9d61d8f7f3692269 make radicale setup vpned --- diff --git a/distro-end b/distro-end index 202f85f..dde7a10 100755 --- a/distro-end +++ b/distro-end @@ -299,6 +299,24 @@ EOF acme-tiny-wrapper mail.iankelling.org sgo openvpn tu /etc/hosts <<<"10.8.0.4 mail.iankelling.org" + domain=cal.iankelling.org + acme-tiny-wrapper $domain + apache-site -f 10.8.0.4:5232 - $domain <<'EOF' +#https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype + + Options +FollowSymLinks +Multiviews +Indexes + AllowOverride None + AuthType basic + AuthName "Authentication Required" + # setup one time, with root:www-data, 640 + AuthUserFile "/etc/caldav-htpasswd" + Require valid-user + +EOF + # nginx version of above would be: + # auth_basic "Not currently available"; + # auth_basic_user_file /etc/nginx/caldav/htpasswd; + echo "$0: $(date): ending now)" diff --git a/radicale-setup b/radicale-setup index 826ddb9..a2cbbd8 100755 --- a/radicale-setup +++ b/radicale-setup @@ -2,6 +2,7 @@ [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" + # davdroid setup instructions at the bottom # main docs: @@ -22,17 +23,9 @@ pi nginx python-dulwich radicale # after it gets created, per the git docs. lnf -T /o/radicale /var/lib/radicale -acme-tiny -n cal.iank.pw - # from https://www.williamjbowman.com/blog/2015/07/24/setting-up-webdav-caldav-and-carddav-servers/ -mkdir /etc/nginx/caldav -touch /etc/nginx/caldav/htpasswd -chmod 640 /etc/nginx/caldav/htpasswd -chgrp www-data /etc/nginx/caldav/htpasswd -nginx-site -f 5232 - cal.iank.pw <<'EOF' - auth_basic "Not currently available"; - auth_basic_user_file /etc/nginx/caldav/htpasswd; -EOF + +# 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 @@ -45,7 +38,7 @@ setini() { } # comments say default is 0.0.0.0:5232 -setini hosts 127.0.0.1:5232 server +setini hosts 10.8.0.1:5232 server # davdroid from f-droid. username ian, # url https://iank.pw/radicale/ian.