Commit 4db1d3b4 authored by w4t's avatar w4t

wtserver 0.25

parent adda3a5c
......@@ -5,16 +5,16 @@
InstallLetsEncrypt() {
local START_TIME=$SECONDS
echo -n -e "$IDENTATION_LVL_0 ${BWhite}Installing LetsEncrypt Certbot${NC}\n"
echo -n -e "$IDENTATION_LVL_1 ${BWhite}Installing LetsEncrypt Certbot${NC}\n"
if [ $CFG_CERTBOT_VERSION == "Certbot" ]; then
if [ $CFG_WEBSERVER == "apache" ]; then
echo -n -e "$IDENTATION_LVL_1 Installing certbot for Apache... "
echo -n -e "$IDENTATION_LVL_2 Installing certbot for Apache... "
apt_install certbot python3-certbot-apache
certbot --apache >>$PROGRAMS_INSTALL_LOG_FILES 2>&1
echo -e "[${green}DONE${NC}]"
elif [ $CFG_WEBSERVER == "nginx" ]; then
echo -n -e "$IDENTATION_LVL_1 Installing certbot for Nginx... "
echo -n -e "$IDENTATION_LVL_2 Installing certbot for Nginx... "
apt_install certbot python3-certbot-nginx
echo -e "[${green}DONE${NC}]"
fi
......@@ -26,7 +26,7 @@ InstallLetsEncrypt() {
#certbot renew --dry-run
elif [ $CFG_CERTBOT_VERSION == "Acme.sh" ]; then
echo -n -e "$IDENTATION_LVL_1 Installing acme.sh... "
echo -n -e "$IDENTATION_LVL_2 Installing acme.sh... "
#Advanced installation
#git clone https://github.com/Neilpang/acme.sh.git
#git clone https://github.com/acmesh-official/acme.sh.git
......
......@@ -66,24 +66,25 @@ InstallMTA() {
-e "/^#default_login_user =/a log_path = /var/log/mail.log" \
"/etc/dovecot/conf.d/10-master.conf"
sed -i "s/ #user =/ user = postfix/" /etc/dovecot/conf.d/10-master.conf
sed -i "s/ #group =/ group = postfix/" /etc/dovecot/conf.d/10-master.conf
sed -i "s/ #user =.*/ user = postfix/" /etc/dovecot/conf.d/10-master.conf
sed -i "s/ #group =.*/ group = postfix/" /etc/dovecot/conf.d/10-master.conf
# The inotify `max_user_instances` default is 128, which constrains
# the total number of watched (IMAP IDLE push) folders by open connections.
# See http://www.dovecot.org/pipermail/dovecot/2013-March/088834.html.
# A reboot is required for this to take effect (which we don't do as
# as a part of setup). Test with `cat /proc/sys/fs/inotify/max_user_instances`.
sed -i "/^#*\s*fs\.inotify\.max_user_instances\s*=/d; $a\fs.inotify.max_user_instances=1024" /etc/sysctl.conf
#sed -i "/^#*\s*fs\.inotify\.max_user_instances\s*=/d; $a\fs.inotify.max_user_instances=1024" /etc/sysctl.conf
echo "fs.inotify.max_user_instances=1024" | sudo tee -a /etc/sysctl.conf
# Set the location where we'll store user mailboxes. '%d' is the domain name and '%n' is the
# username part of the user's email address. We'll ensure that no bad domains or email addresses
# are created within the management daemon.
sed -i -E \
-e "s/^mail_location\s*=\s*.*/mail_location = maildir:$STORAGE_ROOT\/mail\/mailboxes\/%d\/%n/" \
-e "s/^mail_privileged_group\s*=\s*.*/mail_privileged_group = mail/" \
-e "s/^#first_valid_uid\s*=\s*.*/first_valid_uid = 0/" \
/etc/dovecot/conf.d/10-mail.conf
#sed -i -E \
#-e "s/^mail_location\s*=\s*.*/mail_location = maildir:$STORAGE_ROOT\/mail\/mailboxes\/%d\/%n/" \
#-e "s/^mail_privileged_group\s*=\s*.*/mail_privileged_group = mail/" \
#-e "s/^#first_valid_uid\s*=\s*.*/first_valid_uid = 0/" \
#/etc/dovecot/conf.d/10-mail.conf
# Create, subscribe, and mark as special folders: INBOX, Drafts, Sent, Trash, Spam and Archive.
cp $APWD/conf/dovecot-mailboxes.conf /etc/dovecot/conf.d/15-mailboxes.conf
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment