X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mail-setup;h=cdbf9e8ef4216f71453e4d131ee9c40706b7ec20;hb=87c3f2244a47ad10a031a27d0d0456f0a7defd21;hp=7ce6a0daeddb32bd3bcd1852227d6164b1058004;hpb=ca61084446e48fb0703ce2a203c1bd18ceaf4dfb;p=distro-setup diff --git a/mail-setup b/mail-setup index 7ce6a0d..cdbf9e8 100755 --- a/mail-setup +++ b/mail-setup @@ -361,31 +361,8 @@ reload=false if [[ -e /var/local/mail-setup-reload ]]; then reload=true fi -# update file. -# if the file changed, ur=true, else false. -# note: duplicated in brc -u() { - local tmp tmpdir dest="$1" - local base="${dest##*/}" - local dir="${dest%/*}" - if [[ $dir != "$base" ]]; then - # dest has a directory component - mkdir -p "$dir" - fi - ur=false # u result - tmpdir=$(mktemp -d) - cat >$tmpdir/"$base" - tmp=$(rsync -ic $tmpdir/"$base" "$dest") - if [[ $tmp ]]; then - printf "%s\n" "$tmp" - ur=true - if [[ $dest == /etc/systemd/system/* ]]; then - touch /var/local/mail-setup-reload - reload=true - fi - fi - rm -rf $tmpdir -} + +source /a/bin/fai/fai/config/distro-install-common/bash-misc-funcs setini() { key="$1" value="$2" section="$3" file="/etc/radicale/config"