To keep things simple don't treat the default domain name as a special snowflake
This commit is contained in:
parent
17623bd26b
commit
6183b8dfde
|
@ -112,7 +112,6 @@ function remove_mailpile {
|
|||
rm /etc/systemd/system/mailpile.service
|
||||
|
||||
read_config_param "MAILPILE_DOMAIN_NAME"
|
||||
if [[ "$MAILPILE_DOMAIN_NAME" != "$DEFAULT_DOMAIN_NAME" ]]; then
|
||||
nginx_dissite $MAILPILE_DOMAIN_NAME
|
||||
remove_certs ${MAILPILE_DOMAIN_NAME}
|
||||
if [ -f /etc/nginx/sites-available/$MAILPILE_DOMAIN_NAME ]; then
|
||||
|
@ -124,9 +123,6 @@ function remove_mailpile {
|
|||
function_check remove_ddns_domain
|
||||
remove_ddns_domain $MAILPILE_DOMAIN_NAME
|
||||
deluser --remove-all-files mailpile
|
||||
else
|
||||
deluser mailpile
|
||||
fi
|
||||
|
||||
remove_config_param MAILPILE_DOMAIN_NAME
|
||||
remove_config_param MAILPILE_CODE
|
||||
|
@ -179,12 +175,6 @@ function install_mailpile {
|
|||
# create folders and tags
|
||||
su -c "cd /var/www/$MAILPILE_DOMAIN_NAME/htdocs && ./mp --setup" - mailpile
|
||||
|
||||
if [[ $ONION_ONLY == 'no' ]]; then
|
||||
if [[ "$MAILPILE_DOMAIN_NAME" == "$DEFAULT_DOMAIN_NAME" ]]; then
|
||||
su -c "cd /var/www/$MAILPILE_DOMAIN_NAME/htdocs && ./mp set sys.http_path /mail" - mailpile
|
||||
fi
|
||||
fi
|
||||
|
||||
echo '[Unit]' > /etc/systemd/system/mailpile.service
|
||||
echo 'Description=Mailpile Email Client' >> /etc/systemd/system/mailpile.service
|
||||
echo 'After=syslog.target network.target nginx.target' >> /etc/systemd/system/mailpile.service
|
||||
|
@ -262,13 +252,9 @@ function install_mailpile {
|
|||
fi
|
||||
|
||||
function_check create_site_certificate
|
||||
if [[ "$MAILPILE_DOMAIN_NAME" == "$DEFAULT_DOMAIN_NAME" ]]; then
|
||||
if [ ! -f /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.pem ]; then
|
||||
create_site_certificate $MAILPILE_DOMAIN_NAME 'yes'
|
||||
fi
|
||||
else
|
||||
create_site_certificate $MAILPILE_DOMAIN_NAME 'yes'
|
||||
fi
|
||||
|
||||
if [ -f /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.crt ]; then
|
||||
mv /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.crt /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.pem
|
||||
|
|
Loading…
Reference in New Issue