瀏覽代碼

Use onion address for ghost blog

Bob Mottram 8 年之前
父節點
當前提交
8641bb5541
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      src/freedombone-app-ghost

+ 4
- 0
src/freedombone-app-ghost 查看文件

@@ -424,6 +424,10 @@ function install_ghost {
424 424
     configure_php
425 425
 
426 426
     GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
427
+    if [[ $ONION_ONLY != 'no' ]]; then
428
+        sed -i "s|url: .*|url: 'http://${GHOST_ONION_HOSTNAME}',|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
429
+        systemctl restart ghost
430
+    fi
427 431
 
428 432
     function_check nginx_ensite
429 433
     nginx_ensite $GHOST_DOMAIN_NAME