Procházet zdrojové kódy

mediagoblin smtp host

Bob Mottram před 8 roky
rodič
revize
6593eaf809
1 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 12
    0
      src/freedombone-app-mediagoblin

+ 12
- 0
src/freedombone-app-mediagoblin Zobrazit soubor

@@ -411,6 +411,18 @@ function install_mediagoblin {
411 411
     sed -i "s|email_sender_address.*|email_sender_address = \"noreply@${DEFAULT_DOMAIN_NAME}\"|g" $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini
412 412
     sed -i "s|email_sender_address.*|email_sender_address = \"noreply@${DEFAULT_DOMAIN_NAME}\"|g" $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin_local.ini
413 413
 
414
+    if ! grep 'email_smtp_host' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini; then
415
+        sed -i '/email_sender_address/a email_smtp_host = localhost' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini
416
+    else
417
+        sed -i 's|email_smtp_host.*|email_smtp_host = localhost|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini
418
+    fi
419
+
420
+    if ! grep 'email_smtp_host' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin_local.ini; then
421
+        sed -i '/email_sender_address/a email_smtp_host = localhost' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin_local.ini
422
+    else
423
+        sed -i 's|email_smtp_host.*|email_smtp_host = localhost|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin_local.ini
424
+    fi
425
+
414 426
     systemctl enable mediagoblin
415 427
     systemctl daemon-reload
416 428
     systemctl start mediagoblin