zeronet addresses

This commit is contained in:
Bob Mottram 2016-07-17 12:48:40 +01:00
parent 8659a615b2
commit 15d321ff78
1 changed files with 9 additions and 6 deletions

View File

@ -125,10 +125,13 @@ function assemble_web_page {
}
function create_index {
blogaddress=$(cat /home/$MY_USERNAME/.config/zeronet/myblog)
mailaddress=$(cat /home/$MY_USERNAME/.config/zeronet/mymail)
forumaddress=$(cat /home/$MY_USERNAME/.config/zeronet/myforum)
if [ -f $ZERONET_INDEX ]; then
sed -i "s|.*${MY_BLOG_STR}.*| <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/myblog)\">${MY_BLOG_STR}</a></li>|g" $ZERONET_INDEX
sed -i "s|.*${MY_MAIL_STR}.*| <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/mymail)\">${MY_MAIL_STR}</a></li>|g" $ZERONET_INDEX
sed -i "s|.*${MY_FORUM_STR}.*| <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/myforum)\">${MY_FORUM_STR}</a></li>|g" $ZERONET_INDEX
sed -i "s|.*${MY_BLOG_STR}.*| <li><a href=\"${blogaddress}\">${MY_BLOG_STR}</a></li>|g" $ZERONET_INDEX
sed -i "s|.*${MY_MAIL_STR}.*| <li><a href=\"${mailaddress}\">${MY_MAIL_STR}</a></li>|g" $ZERONET_INDEX
sed -i "s|.*${MY_FORUM_STR}.*| <li><a href=\"${forumaddress}\">${MY_FORUM_STR}</a></li>|g" $ZERONET_INDEX
return
fi
echo '<!DOCTYPE html>' > $ZERONET_INDEX
@ -142,9 +145,9 @@ function create_index {
echo "<H2>Your Sites</H2>" >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX
echo '<ol type="square">' >> $ZERONET_INDEX
echo " <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/myblog)\">${MY_BLOG_STR}</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/mymail)\">${MY_MAIL_STR}</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"$(cat /home/$MY_USERNAME/.config/zeronet/myforum)\">${MY_FORUM_STR}</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"${blogaddress}\">${MY_BLOG_STR}</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"${mailaddress}\">${MY_MAIL_STR}</a></li>" >> $ZERONET_INDEX
echo " <li><a href=\"${forumaddress}\">${MY_FORUM_STR}</a></li>" >> $ZERONET_INDEX
# echo " <li><a href=\"http://localhost:5001/webui\">File Share</a></li>" >> $ZERONET_INDEX
echo '</ol>' >> $ZERONET_INDEX
echo '' >> $ZERONET_INDEX