diff --git a/mail-symlink-inbox.sh b/mail-symlink-inbox.sh index 4699799..42da068 100755 --- a/mail-symlink-inbox.sh +++ b/mail-symlink-inbox.sh @@ -4,6 +4,9 @@ set -euo pipefail DEBUG=${DEBUG:-false} +# Thanks https://stackoverflow.com/a/17805088 +$DEBUG && export PS4='${LINENO}: ' && set -x + # Symlink /home/user/mail/inbox to /var/spol/mail/inbox # This lets dovecot autodetect the ~/mail directory - needed # as part of the emergency migration to Obscure's new server. @@ -15,8 +18,9 @@ DEBUG=${DEBUG:-false} # https://doc.dovecot.org/configuration_manual/mail_location/ cd /home find . -maxdepth 2 -type d -name mail | while read -r mailuser; do - user=$(cut -d/ -f1 <<<"$mailuser") - $DEBUG && echo "$user" + $DEBUG && echo -n "mailuser:$mailuser" + user=$(cut -d/ -f2 <<<"$mailuser") + $DEBUG && echo "user:$user" mail="/home/$user/mail" inboxlink="$mail/inbox" varspool="/var/spool/mail/$user" @@ -28,3 +32,4 @@ find . -maxdepth 2 -type d -name mail | while read -r mailuser; do $DEBUG && echo "$user did not qualify" fi done +exit 0 diff --git a/tiamat-install.sh b/tiamat-install.sh index e80d699..000738b 100755 --- a/tiamat-install.sh +++ b/tiamat-install.sh @@ -21,7 +21,6 @@ fi config_network=true primary_int=enp89s0 -primary_int=$primary_int packages=' bind @@ -31,6 +30,7 @@ certbot certbot python3-certbot-apache clamav cmake +dnf-automatic dovecot doxygen emacs @@ -85,7 +85,10 @@ whois ' extra_packages=' -alpine' +alpine +ntfs-3g +shellcheck +tidy' firewall_services_allow=' dns @@ -112,7 +115,15 @@ dnf -y install $packages #shellcheck disable=SC2086 dnf -y install $extra_packages +# Install ledger (built from SRPMS) dnf -y install "$DIR/rpmbuild/RPMS/x86_64/ledger-3.2.1-13.el9.x86_64.rpm" + +# Configure dnf-automatic +if [[ ! -f /etc/dnf/automatic.conf.dist ]]; then + cp -a /etc/dnf/automatic.conf /etc/dnf/automatic.conf.dist +fi +sed -i'' -e 's/root@example.com/root@obscure.org/' /etc/dnf/automatic.conf + # Configure network if "$config_network"; then