Skip to content

Commit

Permalink
Merge pull request #10 from obscureorganization/fix-tiamat-provisioni…
Browse files Browse the repository at this point in the history
…ng-2024

Add more packages, fix mail provisioning
  • Loading branch information
obscurerichard authored Jan 20, 2024
2 parents b414426 + f0489fc commit 806c32e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 7 additions & 2 deletions mail-symlink-inbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand All @@ -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
15 changes: 13 additions & 2 deletions tiamat-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ fi

config_network=true
primary_int=enp89s0
primary_int=$primary_int

packages='
bind
Expand All @@ -31,6 +30,7 @@ certbot
certbot python3-certbot-apache
clamav
cmake
dnf-automatic
dovecot
doxygen
emacs
Expand Down Expand Up @@ -85,7 +85,10 @@ whois
'

extra_packages='
alpine'
alpine
ntfs-3g
shellcheck
tidy'

firewall_services_allow='
dns
Expand All @@ -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
Expand Down

0 comments on commit 806c32e

Please sign in to comment.