Open index page

This commit is contained in:
Bob Mottram 2015-09-03 11:55:59 +01:00
parent 4fd7d55c5d
commit 0c9a609485
1 changed files with 31 additions and 2 deletions

View File

@ -43,6 +43,20 @@ function install_zeronet_blog {
ZERONET_BLOG_ADDRESS=${blog_address//[[:blank:]]/}
ZERONET_BLOG_PRIVATE_KEY=${blog_private_key//[[:blank:]]/}
if [ ${#ZERONET_BLOG_ADDRESS} -lt 20 ]; then
echo "Address: $ZERONET_BLOG_ADDRESS"
echo "Public key: $ZERONET_BLOG_PRIVATE_KEY"
echo 'Unable to create zeronet blog address'
exit 7358
fi
if [ ${#ZERONET_BLOG_PRIVATE_KEY} -lt 20 ]; then
echo "Address: $ZERONET_BLOG_ADDRESS"
echo "Public key: $ZERONET_BLOG_PRIVATE_KEY"
echo 'Unable to create zeronet blog private key'
exit 1639
fi
if [ ! -d "$ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS" ]; then
echo "Unable to find site directory: $ZERONET_DIR/data/$ZERONET_BLOG_ADDRESS"
exit 7638
@ -105,6 +119,20 @@ function install_zeronet_forum {
ZERONET_FORUM_ADDRESS=${forum_address//[[:blank:]]/}
ZERONET_FORUM_PRIVATE_KEY=${forum_private_key//[[:blank:]]/}
if [ ${#ZERONET_FORUM_ADDRESS} -lt 20 ]; then
echo "Address: $ZERONET_FORUM_ADDRESS"
echo "Public key: $ZERONET_FORUM_PRIVATE_KEY"
echo 'Unable to create zeronet forum address'
exit 76352
fi
if [ ${#ZERONET_FORUM_PRIVATE_KEY} -lt 20 ]; then
echo "Address: $ZERONET_FORUM_ADDRESS"
echo "Public key: $ZERONET_FORUM_PRIVATE_KEY"
echo 'Unable to create zeronet forum private key'
exit 87356
fi
if [ ! -d "$ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS" ]; then
echo "Unable to find site directory: $ZERONET_DIR/data/$ZERONET_FORUM_ADDRESS"
exit 7638
@ -241,10 +269,11 @@ if [ $existing_zeronet -lt "2" ]; then
python zeronet.py &
fi
ZERONET_INDEX=/home/$MY_USERNAME/mesh.html
if which xdg-open > /dev/null; then
xdg-open $ZERONET_URL
xdg-open file://$ZERONET_INDEX
elif which gnome-open > /dev/null; then
gnome-open $ZERONET_URL
gnome-open file://$ZERONET_INDEX
fi
exit 0