Default blog settings
This commit is contained in:
parent
c09b186f68
commit
2cd7a08bfa
|
@ -17,6 +17,8 @@ TRACKER_PORT=6969
|
|||
MY_USERNAME=$USER
|
||||
ZERONET_DIR=/home/$MY_USERNAME/zeronet
|
||||
UPDATED="no"
|
||||
ZERONET_DEFAULT_BLOG_TITLE="$(hostname)'s Blog"
|
||||
ZERONET_DEFAULT_BLOG_TAGLINE="Blogging on the Mesh"
|
||||
|
||||
function install_zeronet_blog {
|
||||
if [ ! -f /home/$MY_USERNAME/README ]; then
|
||||
|
@ -71,8 +73,14 @@ function install_zeronet_blog {
|
|||
echo "Blog address: $ZERONET_BLOG_ADDRESS"
|
||||
echo "Blog private key: $ZERONET_BLOG_PRIVATE_KEY"
|
||||
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
|
||||
if [ ! -d $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data ]; then
|
||||
mkdir $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data
|
||||
fi
|
||||
cp $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data-default/data.json $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data
|
||||
sed -i "s/MyZeroBlog/$ZERONET_DEFAULT_BLOG_TITLE/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data/data.json
|
||||
sed -i "s/My ZeroBlog./$ZERONET_DEFAULT_BLOG_TAGLINE/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/data/data.json
|
||||
sed -i "s/ZeroBlog Demo/$ZERONET_DEFAULT_BLOG_TITLE/g" $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS/index.html
|
||||
sed -i "s|<h3 class=\"description\">.*|<h3 class="description">$ZERONET_DEFAULT_BLOG_TAGLINE</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
|
||||
|
||||
|
|
Loading…
Reference in New Issue