Links to your own mesh content

This commit is contained in:
Bob Mottram 2015-09-03 12:09:09 +01:00
parent 0c9a609485
commit b9a96be145
2 changed files with 19 additions and 0 deletions

View File

@ -85,6 +85,11 @@ function install_zeronet_blog {
echo '</service-group>' >> /tmp/zeronet-blog.service
sudo cp /tmp/zeronet-blog.service /etc/avahi/services/zeronet-blog.service
if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then
mkdir -p /home/$MY_USERNAME/.config/zeronet
fi
echo "$ZERONET_BLOG_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/myblog
if ! grep -q "ZeroNet Blog address" /home/$MY_USERNAME/README; then
echo '' >> /home/$MY_USERNAME/README
echo "ZeroNet Blog address: $ZERONET_BLOG_ADDRESS" >> /home/$MY_USERNAME/README
@ -161,6 +166,11 @@ function install_zeronet_forum {
echo '</service-group>' >> /tmp/zeronet-forum.service
sudo cp /tmp/zeronet-forum.service /etc/avahi/services/zeronet-forum.service
if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then
mkdir -p /home/$MY_USERNAME/.config/zeronet
fi
echo "$ZERONET_FORUM_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/myforum
if ! grep -q "ZeroNet Forum address" /home/$MY_USERNAME/README; then
echo '' >> /home/$MY_USERNAME/README
echo "ZeroNet Forum address: $ZERONET_FORUM_ADDRESS" >> /home/$MY_USERNAME/README

View File

@ -60,6 +60,15 @@ function create_index {
echo '<body>' >> $ZERONET_INDEX
echo "<H1>$WEB_PAGE_TITLE</H1>" >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX
echo "<H2>Your Sites</H2>" >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX
echo '<ol type="square">' >> $ZERONET_INDEX
echo " <li><a href=\"file:///home/$MY_USERNAME/.config/zeronet/myblog\">My Blog</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"file:///home/$MY_USERNAME/.config/zeronet/myforum\">My Forum</a></li>" >> $ZERONET_INDEX
echo '</ol>' >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX
echo "<H2>On the Mesh</H2>" >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX
echo '<ol type="square">' >> $ZERONET_INDEX
echo " <li><a href=\"${BLOGS_FILE}.html\">Blogs</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"${FORUM_FILE}.html\">Fora</a></li>" >> $ZERONET_INDEX