Some customisations of blog and forum

This commit is contained in:
Bob Mottram 2015-09-03 14:28:31 +01:00
parent d0dd27ba6c
commit 6d0002f359
1 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@ PEERS_FILE=/tmp/meshwebstart
ZERONET_REPO='https://github.com/bashrc/ZeroNet' ZERONET_REPO='https://github.com/bashrc/ZeroNet'
ZERONET_BLOG_REPO='https://github.com/HelloZeroNet/ZeroBlog' ZERONET_BLOG_REPO='https://github.com/HelloZeroNet/ZeroBlog'
ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroTalk' ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroBoard'
ZERONET_DIR=~/zeronet ZERONET_DIR=~/zeronet
ZERONET_URL=http://127.0.0.1:43110 ZERONET_URL=http://127.0.0.1:43110
ZERONET_PORT=15441 ZERONET_PORT=15441
@ -67,9 +67,13 @@ function install_zeronet_blog {
echo 'ZeroBlog repo could not be cloned' echo 'ZeroBlog repo could not be cloned'
exit 6739 exit 6739
fi fi
echo "Blog address: $ZERONET_BLOG_ADDRESS" echo "Blog address: $ZERONET_BLOG_ADDRESS"
echo "Blog private key: $ZERONET_BLOG_PRIVATE_KEY" echo "Blog private key: $ZERONET_BLOG_PRIVATE_KEY"
cp -r $ZERONET_DIR/ZeroBlog/* $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS cp -r $ZERONET_DIR/ZeroBlog/* $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS
sed -i "s/ZeroBlog Demo/$(hostname)'s Blog/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/index.html
sed -i 's|<h3 class="description">.*|<h3 class="description">Freedom in the Mesh</h3>|g' $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/index.html
sed -i "s/Blogging platform Demo/Blogging platform/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/content.json
python zeronet.py siteSign $ZERONET_BLOG_ADDRESS $ZERONET_BLOG_PRIVATE_KEY python zeronet.py siteSign $ZERONET_BLOG_ADDRESS $ZERONET_BLOG_PRIVATE_KEY
# Add an avahi service # Add an avahi service
@ -151,6 +155,10 @@ function install_zeronet_forum {
echo "Forum address: $ZERONET_FORUM_ADDRESS" echo "Forum address: $ZERONET_FORUM_ADDRESS"
echo "Forum private key: $ZERONET_FORUM_PRIVATE_KEY" echo "Forum private key: $ZERONET_FORUM_PRIVATE_KEY"
cp -r $ZERONET_DIR/ZeroTalk/* $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS cp -r $ZERONET_DIR/ZeroTalk/* $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS
sed -i "s/ZeroBoard/$(hostname)'s Forum/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
sed -i "s/ZeroTalk/$(hostname)'s Forum/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
sed -i 's|<h3 class="description">.*|<h3 class="description">Freedom in the Mesh</h3>|g' $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/index.html
sed -i "s/Messaging Board Demo/Messaging Board/g" $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS/content.json
python zeronet.py siteSign $ZERONET_FORUM_ADDRESS $ZERONET_FORUM_PRIVATE_KEY python zeronet.py siteSign $ZERONET_FORUM_ADDRESS $ZERONET_FORUM_PRIVATE_KEY
# Add an avahi service # Add an avahi service