Skip to content
Snippets Groups Projects
Commit 15487806 authored by Bob Mottram's avatar Bob Mottram
Browse files

Use onion address

parent 24f89a03
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,8 @@ function install_mailpile {
# create folders and tags
su -c "cd /var/www/$MAILPILE_DOMAIN_NAME/mail && ./mp --setup" - mailpile
MAILPILE_ONION_HOSTNAME=$(add_onion_service mailpile 80 ${MAILPILE_ONION_PORT})
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
......@@ -331,12 +333,13 @@ function install_mailpile {
echo '' >> $mailpile_nginx_site
nginx_keybase ${MAILPILE_DOMAIN_NAME}
echo '}' >> $mailpile_nginx_site
echo '' >> $mailpile_nginx_site
else
echo -n '' > $mailpile_nginx_site
fi
echo 'server {' >> $mailpile_nginx_site
echo " listen 127.0.0.1:$MAILPILE_ONION_PORT default_server;" >> $mailpile_nginx_site
echo " server_name $MAILPILE_DOMAIN_NAME;" >> $mailpile_nginx_site
echo " server_name $MAILPILE_ONION_HOSTNAME;" >> $mailpile_nginx_site
echo '' >> $mailpile_nginx_site
function_check nginx_disable_sniffing
nginx_disable_sniffing $MAILPILE_DOMAIN_NAME
......@@ -382,8 +385,6 @@ function install_mailpile {
function_check nginx_ensite
nginx_ensite $MAILPILE_DOMAIN_NAME
MAILPILE_ONION_HOSTNAME=$(add_onion_service mailpile 80 ${MAILPILE_ONION_PORT})
if ! grep -q "Mailpile onion domain" /home/$MY_USERNAME/README; then
echo $"Mailpile onion domain: ${MAILPILE_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment