Skip to content
Snippets Groups Projects
Commit 47b1e68c authored by Bob Mottram's avatar Bob Mottram
Browse files

Peg zeronet forum to a commit

parent f1b38ac5
No related branches found
No related tags found
No related merge requests found
......@@ -1975,6 +1975,24 @@ function install_zeronet_forum {
return
fi
 
# update to the next commit
if [ -d /opt/zeronet/ZeroTalk ]; then
if grep -q "ZeroNet Forum commit" $COMPLETION_FILE; then
CURRENT_ZERONET_FORUM_COMMIT=$(grep "ZeroNet Forum commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
if [[ "$CURRENT_ZERONET_FORUM_COMMIT" != "$ZERONET_FORUM_COMMIT" ]]; then
cd /opt/zeronet/ZeroTalk
git stash
git checkout master
git pull
git checkout $ZERONET_FORUM_COMMIT
git checkout -b $ZERONET_FORUM_COMMIT
sed -i "s/ZeroNet Forum commit.*/ZeroNet Forum commit:$ZERONET_FORUM_COMMIT/g" $COMPLETION_FILE
fi
else
echo "ZeroNet Forum commit:$ZERONET_FORUM_COMMIT" >> $COMPLETION_FILE
fi
fi
if grep -Fxq "install_zeronet_forum" $COMPLETION_FILE; then
return
fi
......@@ -2029,6 +2047,14 @@ function install_zeronet_forum {
echo $'ZeroTalk repo could not be cloned'
exit 6739
fi
git checkout $ZERONET_FORUM_COMMIT
git checkout -b $ZERONET_FORUM_COMMIT
if ! grep -q "ZeroNet Forum commit" $COMPLETION_FILE; then
echo "ZeroNet Forum commit:$ZERONET_FORUM_COMMIT" >> $COMPLETION_FILE
else
sed -i "s/ZeroNet Forum commit.*/ZeroNet Forum commit:$ZERONET_FORUM_COMMIT/g" $COMPLETION_FILE
fi
echo $"Forum address: $ZERONET_FORUM_ADDRESS"
echo $"Forum private key: $ZERONET_FORUM_PRIVATE_KEY"
cp -r /opt/zeronet/ZeroTalk/* /opt/zeronet/data/$ZERONET_FORUM_ADDRESS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment