[BACK]Return to shell CVS log [TXT][DIR] Up to [local] / botnow

File: [local] / botnow / shell (download)

Revision 1.1, Sat May 15 15:12:32 2021 UTC (2 years, 11 months ago) by bountyht
Branch point for: MAIN

Initial revision

if [ -n "$1" ]; then

groupadd $1
adduser -batch $1 $1 $1 `encrypt $2`

chmod 700 /home/$1 /home/$1/.ssh
chmod 600 /home/$1/{.Xdefaults,.cshrc,.cvsrc,.login,.mailrc,.profile}
mkdir /var/www/htdocs/$1
ln -s /var/www/htdocs/$1 /home/$1/htdocs
chown -R $1:www /var/www/htdocs/$1 /home/$1/htdocs
chmod -R o-rx /var/www/htdocs/$1 /home/$1/htdocs
chmod -R g+rwx /var/www/htdocs/$1 /home/$1/htdocs
echo "server \"$1.us10.ircnow.org\" {
        listen on * tls port 443
        tls {
                certificate \"/etc/ssl/$1.us10.ircnow.org.fullchain.pem\"
                key \"/etc/ssl/private/$1.us10.ircnow.org.key\"
        }
        location \"/.well-known/acme-challenge/*\" {
                root \"/acme\"
        }
        location \"*.php\" {
                fastcgi socket \"/run/php-fpm.sock\"
        }
        root \"/htdocs/$1\"
}
" >> /etc/httpd.conf
echo "domain \"$1.us10.ircnow.org\" {
        domain key \"/etc/ssl/private/$1.us10.ircnow.org.key\"
        domain full chain certificate \"/etc/ssl/$1.us10.ircnow.org.fullchain.pem\"
        sign with letsencrypt
}
" >> /etc/acme-client.conf
#edquota $1
fi