From: Ian Kelling Date: Wed, 19 Jun 2024 15:54:36 +0000 (-0400) Subject: distro specific fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=2cc69451de3e13458ee9af775aae1dca76c4b18a;p=distro-setup distro specific fixes --- diff --git a/brc b/brc index d359f65..222e0f8 100644 --- a/brc +++ b/brc @@ -3377,7 +3377,8 @@ if [[ $- == *i* ]]; then # titelbar below #echo -ne "$_title_escape $HOSTNAME ${PWD/#$HOME/~} \007" - if [[ $KONSOLE_VERSION ]]; then + # version 211203 does not have this feature. + if [[ $KONSOLE_VERSION && $KONSOLE_VERSION == [3456789]* || $KONSOLE_VERSION == 2[2456789]* ]]; then # from konsole, output via ctrl-alt-] if [[ ! $PS1 =~ 133 ]] ; then PS1='\[\e]133;L\a\]\[\e]133;D;$?\]\[\e]133;A\a\]'$PS1'\[\e]133;B\a\]' ; diff --git a/mail-setup b/mail-setup index cdbf9e8..616d39b 100755 --- a/mail-setup +++ b/mail-setup @@ -453,9 +453,17 @@ Pin-Priority: 500 EOF fi + +unit-exists() { + systemctl cat $1 &>/dev/null +} +spamd-timer-exists() { + unit-exists spamassassin-maintenance.timer +} + # name change in t12, and now timer instead of cron option in /etc/default first_spamd_run=false -if ! systemctl cat spamassassin-maintenance.timer &>/dev/null; then +if ! spamd-timer-exists; then first_spamd_run=true fi @@ -468,10 +476,14 @@ spamd_ser=spamd if systemctl cat spamassassin &>/dev/null; then spamd_ser=spamassassin elif $first_spamd_run; then - systemctl start spamassassin-maintenance + if spamd-timer-exists; then + systemctl start spamassassin-maintenance + fi fi -systemctl enable --now spamassassin-maintenance.timer +if spamd-timer-exists; then + systemctl enable --now spamassassin-maintenance.timer +fi # note: pyzor debian readme says you need to run some initialization command # but its outdated.