X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=radicale-setup;h=cb43a477fd2399b64486a423c47070d98f10dd35;hb=390af9a88d32306b789a0e8858d375bf8ca054b0;hp=2f22e642b6429c8917547478bdd8e2951ccad544;hpb=1ad20724a44a0ee3adc2f4a1d002850fbad7a372;p=distro-setup diff --git a/radicale-setup b/radicale-setup index 2f22e64..cb43a47 100755 --- a/radicale-setup +++ b/radicale-setup @@ -1,25 +1,70 @@ -#!/bin/bash -l +#!/bin/bash -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" +if [[ -e /b/errhandle/err ]]; then + source /b/errhandle/err +else + set -eE -o pipefail + trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +fi +source /a/bin/bash_unpublished/source-state +source /a/bin/distro-functions/src/package-manager-abstractions # davdroid setup instructions at the bottom # main docs: # http://radicale.org/user_documentation/ # https://davdroid.bitfire.at/configuration/ +# note on debugging: if radicale can't bind to the address, +# in the log it just says "Starting Radicale". If you run +# it in the foreground, it will give more info. Background +# plus debug does not help. +# sudo -u radicale radicale -D -f # created password file with: # htpasswd -c /etc/davpass dav +vpn_ser=openvpn-client +if [[ ! -e /lib/systemd/system/openvpn-client@.service ]]; then + vpn_ser=openvpn +fi + +d=/etc/systemd/system/radicale.service.d +mkdir -p $d +cat >$d/override.conf <