Compare commits
4 Commits
b3590258cd
...
feature/se
| Author | SHA1 | Date | |
|---|---|---|---|
| 5db151c0f4 | |||
| c28dc76afe | |||
| 5ac717f75f | |||
| 0eb6772554 |
12
add_user.sh
12
add_user.sh
@@ -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,8 +40,9 @@ 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
|
||||
set -g mouse on
|
||||
setw -g mode-keys vi
|
||||
@@ -86,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" # 500 MB RAM
|
||||
|
||||
6
snapshots.sh
Executable file
6
snapshots.sh
Executable 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
|
||||
Reference in New Issue
Block a user