Compare commits
3 Commits
0eb6772554
...
feature/se
| Author | SHA1 | Date | |
|---|---|---|---|
| 5db151c0f4 | |||
| c28dc76afe | |||
| 5ac717f75f |
11
add_user.sh
11
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/new
|
||||||
mkdir -p /home/$LOGIN/Maildir/Trash/tmp
|
mkdir -p /home/$LOGIN/Maildir/Trash/tmp
|
||||||
|
|
||||||
|
chmod -R 0700 /home/$LOGIN/Maildir
|
||||||
|
|
||||||
cp -r /root/helpers/public_html /home/$LOGIN/
|
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/index.php
|
||||||
sed -i "s/<<USER>>/$LOGIN/g" /home/$LOGIN/public_html/parts/header.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/
|
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
|
mkdir -p /home/$LOGIN/.config/tmux
|
||||||
cat << EOF > /home/$LOGIN/.config/tmux/tmux.conf
|
cat << EOF > /home/$LOGIN/.config/tmux/tmux.conf
|
||||||
@@ -87,6 +89,13 @@ EOF
|
|||||||
# end gemini
|
# end gemini
|
||||||
|
|
||||||
chown -R $LOGIN:$LOGIN /home/$LOGIN/
|
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
|
sendmail -f void1st@tylda.org $LOGIN@tylda.org < welcome.txt
|
||||||
|
|
||||||
echo 524288000 > "$USER_CG/memory.max" # 500 MB RAM
|
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