浏览代码

Use onion address for ghost blog

Bob Mottram 9 年前
父节点
当前提交
8641bb5541
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/freedombone-app-ghost

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

424
     configure_php
424
     configure_php
425
 
425
 
426
     GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
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
     function_check nginx_ensite
432
     function_check nginx_ensite
429
     nginx_ensite $GHOST_DOMAIN_NAME
433
     nginx_ensite $GHOST_DOMAIN_NAME