From 8026ba05fe0879e537cef9c3888bf038f02b5f93 Mon Sep 17 00:00:00 2001 From: Smoorg Date: Tue, 9 Jun 2026 13:30:12 +0200 Subject: [PATCH] make neomitt setup a function --- add_user.sh | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/add_user.sh b/add_user.sh index ebf12f3..1464598 100755 --- a/add_user.sh +++ b/add_user.sh @@ -18,23 +18,16 @@ zfs create -o mountpoint=/home/$LOGIN -o quota=200M tank/ROOT/homes/$LOGIN chown $LOGIN:$LOGIN /home/$LOGIN cat "export EDITOR=nvim" >> /home/$LOGIN/.ashrc -mkdir -p /home/$LOGIN/Maildir/Inbox/cur -mkdir -p /home/$LOGIN/Maildir/Inbox/new -mkdir -p /home/$LOGIN/Maildir/Inbox/tmp +setup_neomutt () { + for dir in "Inbox" "Sent" "Drafts" "Trash"; do + for subdir in "cur" "new" "tmp"; do + # mkdir -p /home/"$LOGIN"/Maildir/$dir/$subdir + echo "$dir/$subdir" + done + done -mkdir -p /home/$LOGIN/Maildir/Sent/cur -mkdir -p /home/$LOGIN/Maildir/Sent/new -mkdir -p /home/$LOGIN/Maildir/Sent/tmp - -mkdir -p /home/$LOGIN/Maildir/Drafts/cur -mkdir -p /home/$LOGIN/Maildir/Drafts/new -mkdir -p /home/$LOGIN/Maildir/Drafts/tmp - -mkdir -p /home/$LOGIN/Maildir/Trash/cur -mkdir -p /home/$LOGIN/Maildir/Trash/new -mkdir -p /home/$LOGIN/Maildir/Trash/tmp - -chmod -R 0700 /home/$LOGIN/Maildir + chmod -R 0700 /home/"$LOGIN"/Maildir +} cp -r /root/helpers/public_html /home/$LOGIN/ sed -i "s/<>/$LOGIN/g" /home/$LOGIN/public_html/index.php