X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=radicale-setup;h=3cfaa8225a2b424aed0d33d6f0f54845a401482b;hb=b311e6f6fa930805674d7d53d67cd033fdbf3367;hp=cb27eda4ec1d93165c50723d72d10f59a7938fea;hpb=ebd0ea323de3eacc11e1a624f8cc4f961d8bdb6c;p=distro-setup diff --git a/radicale-setup b/radicale-setup index cb27eda..3cfaa82 100755 --- a/radicale-setup +++ b/radicale-setup @@ -1,8 +1,16 @@ -#!/bin/bash -l +#!/bin/bash [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +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: @@ -18,26 +26,45 @@ # 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 -sudo dd of=$d/override.conf <<'EOF' +cat >$d/override.conf <