Bob Mottram před 8 roky
rodič
revize
4c7fc03736
1 změnil soubory, kde provedl 5 přidání a 7 odebrání
  1. 5
    7
      src/freedombone-app-ghost

+ 5
- 7
src/freedombone-app-ghost Zobrazit soubor

@@ -218,11 +218,8 @@ function ghost_create_config {
218 218
     echo '' >> $ghost_config
219 219
     echo 'config = {' >> $ghost_config
220 220
     echo '    production: {' >> $ghost_config
221
-    if [[ $ONION_ONLY == 'no' ]]; then
222
-        echo "        url: 'https://${GHOST_DOMAIN_NAME}'," >> $ghost_config
223
-    else
224
-        echo "        url: 'http://${GHOST_DOMAIN_NAME}'," >> $ghost_config
225
-    fi
221
+    echo '        // This needs to be http and NOT https' >> $ghost_config
222
+    echo "        url: 'http://${GHOST_DOMAIN_NAME}'," >> $ghost_config
226 223
     echo '        mail: {' >> $ghost_config
227 224
     echo "            transport: 'SMTP'," >> $ghost_config
228 225
     echo '            options: {' >> $ghost_config
@@ -344,6 +341,8 @@ function install_ghost {
344 341
     systemctl daemon-reload
345 342
     systemctl start ghost
346 343
 
344
+    GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
345
+
347 346
     if [[ ${ONION_ONLY} == "no" ]]; then
348 347
         function_check nginx_http_redirect
349 348
         nginx_http_redirect ${GHOST_DOMAIN_NAME}
@@ -386,7 +385,7 @@ function install_ghost {
386 385
     echo 'server {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
387 386
     echo "    listen 127.0.0.1:${GHOST_ONION_PORT} default_server;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
388 387
     echo "    root /var/www/$GHOST_DOMAIN_NAME/htdocs;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
389
-    echo "    server_name $GHOST_DOMAIN_NAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
388
+    echo "    server_name $GHOST_ONION_HOSTNAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
390 389
     echo '    access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
391 390
     echo "    error_log /var/log/nginx/${GHOST_DOMAIN_NAME}_error.log ${WEBSERVER_LOG_LEVEL};" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
392 391
     echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
@@ -420,7 +419,6 @@ function install_ghost {
420 419
     function_check configure_php
421 420
     configure_php
422 421
 
423
-    GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
424 422
     if [[ $ONION_ONLY != 'no' ]]; then
425 423
         sed -i "s|url: .*|url: 'http://${GHOST_ONION_HOSTNAME}',|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
426 424
         systemctl restart ghost