3 Commits

2 changed files with 16 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ 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
cp -r /root/helpers/public_html /home/$LOGIN/
sed -i "s/<<USER>>/$LOGIN/g" /home/$LOGIN/public_html/index.php
sed -i "s/<<USER>>/$LOGIN/g" /home/$LOGIN/public_html/parts/header.php
@@ -38,7 +40,7 @@ sed -i "s/<<USER>>/$LOGIN/g" /home/$LOGIN/public_html/blog/index.php
mkdir -p /home/$LOGIN/.config/weechat/
cp irc.conf /home/$LOGIN/.config/weechat
cp /root/helpers/irc.conf /home/$LOGIN/.config/weechat
mkdir -p /home/$LOGIN/.config/tmux
cat << EOF > /home/$LOGIN/.config/tmux/tmux.conf
@@ -87,6 +89,13 @@ EOF
# end gemini
chown -R $LOGIN:$LOGIN /home/$LOGIN/
mkdir -p /home/$LOGIN/.ssh
mkdir -p /home/$LOGIN/.gnupg
chmod 0700 /home/$LOGIN/.ssh
chmod 0700 /home/$LOGIN/.gnupg
sendmail -f void1st@tylda.org $LOGIN@tylda.org < welcome.txt
echo 524288000 > "$USER_CG/memory.max" # 500MB RAM

6
snapshots.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/ash
for u in $(ls /home); do
zfs snapshot tank/ROOT/homes/$u@$(date "+%Y%m%d")
zfs destroy tank/ROOT/homes/$u@$(date --date="-5 days" "+%Y%m%d")
done