|
@@ -112,21 +112,17 @@ function remove_mailpile {
|
112
|
112
|
rm /etc/systemd/system/mailpile.service
|
113
|
113
|
|
114
|
114
|
read_config_param "MAILPILE_DOMAIN_NAME"
|
115
|
|
- if [[ "$MAILPILE_DOMAIN_NAME" != "$DEFAULT_DOMAIN_NAME" ]]; then
|
116
|
|
- nginx_dissite $MAILPILE_DOMAIN_NAME
|
117
|
|
- remove_certs ${MAILPILE_DOMAIN_NAME}
|
118
|
|
- if [ -f /etc/nginx/sites-available/$MAILPILE_DOMAIN_NAME ]; then
|
119
|
|
- rm -f /etc/nginx/sites-available/$MAILPILE_DOMAIN_NAME
|
120
|
|
- fi
|
121
|
|
- if [ -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
|
122
|
|
- rm -rf /var/www/$MAILPILE_DOMAIN_NAME
|
123
|
|
- fi
|
124
|
|
- function_check remove_ddns_domain
|
125
|
|
- remove_ddns_domain $MAILPILE_DOMAIN_NAME
|
126
|
|
- deluser --remove-all-files mailpile
|
127
|
|
- else
|
128
|
|
- deluser mailpile
|
|
115
|
+ nginx_dissite $MAILPILE_DOMAIN_NAME
|
|
116
|
+ remove_certs ${MAILPILE_DOMAIN_NAME}
|
|
117
|
+ if [ -f /etc/nginx/sites-available/$MAILPILE_DOMAIN_NAME ]; then
|
|
118
|
+ rm -f /etc/nginx/sites-available/$MAILPILE_DOMAIN_NAME
|
129
|
119
|
fi
|
|
120
|
+ if [ -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
|
|
121
|
+ rm -rf /var/www/$MAILPILE_DOMAIN_NAME
|
|
122
|
+ fi
|
|
123
|
+ function_check remove_ddns_domain
|
|
124
|
+ remove_ddns_domain $MAILPILE_DOMAIN_NAME
|
|
125
|
+ deluser --remove-all-files mailpile
|
130
|
126
|
|
131
|
127
|
remove_config_param MAILPILE_DOMAIN_NAME
|
132
|
128
|
remove_config_param MAILPILE_CODE
|
|
@@ -179,12 +175,6 @@ function install_mailpile {
|
179
|
175
|
# create folders and tags
|
180
|
176
|
su -c "cd /var/www/$MAILPILE_DOMAIN_NAME/htdocs && ./mp --setup" - mailpile
|
181
|
177
|
|
182
|
|
- if [[ $ONION_ONLY == 'no' ]]; then
|
183
|
|
- if [[ "$MAILPILE_DOMAIN_NAME" == "$DEFAULT_DOMAIN_NAME" ]]; then
|
184
|
|
- su -c "cd /var/www/$MAILPILE_DOMAIN_NAME/htdocs && ./mp set sys.http_path /mail" - mailpile
|
185
|
|
- fi
|
186
|
|
- fi
|
187
|
|
-
|
188
|
178
|
echo '[Unit]' > /etc/systemd/system/mailpile.service
|
189
|
179
|
echo 'Description=Mailpile Email Client' >> /etc/systemd/system/mailpile.service
|
190
|
180
|
echo 'After=syslog.target network.target nginx.target' >> /etc/systemd/system/mailpile.service
|
|
@@ -262,11 +252,7 @@ function install_mailpile {
|
262
|
252
|
fi
|
263
|
253
|
|
264
|
254
|
function_check create_site_certificate
|
265
|
|
- if [[ "$MAILPILE_DOMAIN_NAME" == "$DEFAULT_DOMAIN_NAME" ]]; then
|
266
|
|
- if [ ! -f /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.pem ]; then
|
267
|
|
- create_site_certificate $MAILPILE_DOMAIN_NAME 'yes'
|
268
|
|
- fi
|
269
|
|
- else
|
|
255
|
+ if [ ! -f /etc/ssl/certs/${MAILPILE_DOMAIN_NAME}.pem ]; then
|
270
|
256
|
create_site_certificate $MAILPILE_DOMAIN_NAME 'yes'
|
271
|
257
|
fi
|
272
|
258
|
|