浏览代码

Some customisations of blog and forum

Bob Mottram 9 年前
父节点
当前提交
6d0002f359
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9
    1
      src/freedombone-meshweb

+ 9
- 1
src/freedombone-meshweb 查看文件

@@ -10,7 +10,7 @@ PEERS_FILE=/tmp/meshwebstart
10 10
 
11 11
 ZERONET_REPO='https://github.com/bashrc/ZeroNet'
12 12
 ZERONET_BLOG_REPO='https://github.com/HelloZeroNet/ZeroBlog'
13
-ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroTalk'
13
+ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroBoard'
14 14
 ZERONET_DIR=~/zeronet
15 15
 ZERONET_URL=http://127.0.0.1:43110
16 16
 ZERONET_PORT=15441
@@ -67,9 +67,13 @@ function install_zeronet_blog {
67 67
         echo 'ZeroBlog repo could not be cloned'
68 68
         exit 6739
69 69
     fi
70
+
70 71
     echo "Blog address:     $ZERONET_BLOG_ADDRESS"
71 72
     echo "Blog private key: $ZERONET_BLOG_PRIVATE_KEY"
72 73
     cp -r $ZERONET_DIR/ZeroBlog/* $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS
74
+    sed -i "s/ZeroBlog Demo/$(hostname)'s Blog/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/index.html
75
+    sed -i 's|<h3 class="description">.*|<h3 class="description">Freedom in the Mesh</h3>|g' $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/index.html
76
+    sed -i "s/Blogging platform Demo/Blogging platform/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/content.json
73 77
     python zeronet.py siteSign $ZERONET_BLOG_ADDRESS $ZERONET_BLOG_PRIVATE_KEY
74 78
 
75 79
     # Add an avahi service
@@ -151,6 +155,10 @@ function install_zeronet_forum {
151 155
     echo "Forum address:     $ZERONET_FORUM_ADDRESS"
152 156
     echo "Forum private key: $ZERONET_FORUM_PRIVATE_KEY"
153 157
     cp -r $ZERONET_DIR/ZeroTalk/* $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS
158
+    sed -i "s/ZeroBoard/$(hostname)'s Forum/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
159
+    sed -i "s/ZeroTalk/$(hostname)'s Forum/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
160
+    sed -i 's|<h3 class="description">.*|<h3 class="description">Freedom in the Mesh</h3>|g' $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
161
+    sed -i "s/Messaging Board Demo/Messaging Board/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/content.json
154 162
     python zeronet.py siteSign $ZERONET_FORUM_ADDRESS $ZERONET_FORUM_PRIVATE_KEY
155 163
 
156 164
     # Add an avahi service