# 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\]' ;
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
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.