Blame
Date:
Sun Oct 8 22:28:02 2023 UTC
Message:
Now prevents creating accounts that exist in database with a password
01
2021-12-17
jrmu
if [ -n "$1" ]; then
02
2021-12-17
jrmu
03
2021-12-17
jrmu
groupadd $1
04
2021-12-17
jrmu
adduser -batch $1 $1 $1 `encrypt $2`
05
2021-12-17
jrmu
06
2021-12-17
jrmu
chmod 700 /home/$1 /home/$1/.ssh
07
2021-12-17
jrmu
chmod 600 /home/$1/{.Xdefaults,.cshrc,.cvsrc,.login,.mailrc,.profile}
08
2021-12-17
jrmu
mkdir /var/www/htdocs/$1
09
2021-12-17
jrmu
ln -s /var/www/htdocs/$1 /home/$1/htdocs
10
2021-12-17
jrmu
chown -R $1:www /var/www/htdocs/$1 /home/$1/htdocs
11
2021-12-17
jrmu
chmod -R o-rx /var/www/htdocs/$1 /home/$1/htdocs
12
2021-12-17
jrmu
chmod -R g+rwx /var/www/htdocs/$1 /home/$1/htdocs
13
2021-12-17
jrmu
echo "server \"$1.us10.ircnow.org\" {
14
2021-12-17
jrmu
listen on * tls port 443
15
2021-12-17
jrmu
tls {
16
2021-12-17
jrmu
certificate \"/etc/ssl/$1.us10.ircnow.org.fullchain.pem\"
17
2021-12-17
jrmu
key \"/etc/ssl/private/$1.us10.ircnow.org.key\"
18
2021-12-17
jrmu
}
19
2021-12-17
jrmu
location \"/.well-known/acme-challenge/*\" {
20
2021-12-17
jrmu
root \"/acme\"
21
2021-12-17
jrmu
}
22
2021-12-17
jrmu
location \"*.php\" {
23
2021-12-17
jrmu
fastcgi socket \"/run/php-fpm.sock\"
24
2021-12-17
jrmu
}
25
2021-12-17
jrmu
root \"/htdocs/$1\"
26
2021-12-17
jrmu
}
27
2021-12-17
jrmu
" >> /etc/httpd.conf
28
2021-12-17
jrmu
echo "domain \"$1.us10.ircnow.org\" {
29
2021-12-17
jrmu
domain key \"/etc/ssl/private/$1.us10.ircnow.org.key\"
30
2021-12-17
jrmu
domain full chain certificate \"/etc/ssl/$1.us10.ircnow.org.fullchain.pem\"
31
2021-12-17
jrmu
sign with letsencrypt
32
2021-12-17
jrmu
}
33
2021-12-17
jrmu
" >> /etc/acme-client.conf
34
2021-12-17
jrmu
#edquota $1
35
2021-12-17
jrmu
fi
IRCNow