Peg zeronet blog to a commit
This commit is contained in:
parent
2c7bca82b6
commit
f1b38ac5fc
|
@ -446,7 +446,9 @@ TOXIC_COMMIT='88270827a96b2082e254677f35585ed24581a42c'
|
|||
ZERONET_REPO='https://github.com/HelloZeroNet/ZeroNet.git'
|
||||
ZERONET_COMMIT='675bd462556c541d65e2d95f91f899146a373aad'
|
||||
ZERONET_BLOG_REPO='https://github.com/HelloZeroNet/ZeroBlog'
|
||||
ZERONET_BLOG_COMMIT='bbb0d6c36465fed2e6df71f1aab45fcc9c6ad609'
|
||||
ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroTalk'
|
||||
ZERONET_FORUM_COMMIT='e2d2c9cb1cfbfef91b244935efb5c14c2ad95faa'
|
||||
ZERONET_URL=http://127.0.0.1:43110
|
||||
ZERONET_PORT=15441
|
||||
TRACKER_PORT=6969
|
||||
|
@ -891,6 +893,12 @@ function read_configuration {
|
|||
if grep -q "IPFS_COMMIT" $CONFIGURATION_FILE; then
|
||||
IPFS_COMMIT=$(grep "IPFS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ZERONET_BLOG_COMMIT" $CONFIGURATION_FILE; then
|
||||
ZERONET_BLOG_COMMIT=$(grep "ZERONET_BLOG_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ZERONET_FORUM_COMMIT" $CONFIGURATION_FILE; then
|
||||
ZERONET_FORUM_COMMIT=$(grep "ZERONET_FORUM_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE; then
|
||||
GNUSOCIAL_COMMIT=$(grep "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
@ -1839,6 +1847,23 @@ function install_zeronet_blog {
|
|||
return
|
||||
fi
|
||||
|
||||
if [ -d /opt/zeronet/ZeroBlog ]; then
|
||||
if grep -q "ZeroNet Blog commit" $COMPLETION_FILE; then
|
||||
CURRENT_ZERONET_BLOG_COMMIT=$(grep "ZeroNet Blog commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
|
||||
if [[ "$CURRENT_ZERONET_BLOG_COMMIT" != "$ZERONET_BLOG_COMMIT" ]]; then
|
||||
cd /opt/zeronet/ZeroBlog
|
||||
git stash
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout $ZERONET_BLOG_COMMIT
|
||||
git checkout -b $ZERONET_BLOG_COMMIT
|
||||
sed -i "s/ZeroNet Blog commit.*/ZeroNet Blog commit:$ZERONET_BLOG_COMMIT/g" $COMPLETION_FILE
|
||||
fi
|
||||
else
|
||||
echo "ZeroNet Blog commit:$ZERONET_BLOG_COMMIT" >> $COMPLETION_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_zeronet_blog" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
|
@ -1893,6 +1918,15 @@ function install_zeronet_blog {
|
|||
echo 'ZeroBlog repo could not be cloned'
|
||||
exit 6739
|
||||
fi
|
||||
cd /opt/zeronet/ZeroBlog
|
||||
git checkout $ZERONET_BLOG_COMMIT
|
||||
git checkout -b $ZERONET_BLOG_COMMIT
|
||||
if ! grep -q "ZeroNet Blog commit" $COMPLETION_FILE; then
|
||||
echo "ZeroNet Blog commit:$ZERONET_BLOG_COMMIT" >> $COMPLETION_FILE
|
||||
else
|
||||
sed -i "s/ZeroNet Blog commit.*/ZeroNet Blog commit:$ZERONET_BLOG_COMMIT/g" $COMPLETION_FILE
|
||||
fi
|
||||
|
||||
echo $"ZeroNet Blog address: $ZERONET_BLOG_ADDRESS"
|
||||
echo $"ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY"
|
||||
cp -r /opt/zeronet/ZeroBlog/* /opt/zeronet/data/$ZERONET_BLOG_ADDRESS
|
||||
|
@ -8090,7 +8124,7 @@ function email_archiving {
|
|||
cp $INSTALL_DIR/cleanup-maildir/cleanup-maildir /usr/bin
|
||||
fi
|
||||
else
|
||||
echo "cleanup-maildir commit:$GNUSOCIAL_COMMIT" >> $COMPLETION_FILE
|
||||
echo "cleanup-maildir commit:$CLEANUP_MAILDIR_COMMIT" >> $COMPLETION_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -8388,7 +8422,7 @@ function install_web_server {
|
|||
# update to the next commit
|
||||
if [ -d $INSTALL_DIR/nginx_ensite ]; then
|
||||
if grep -q "Nginx-ensite commit" $COMPLETION_FILE; then
|
||||
CURRENT_GNUSOCIAL_COMMIT=$(grep "Nginx-ensite commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
|
||||
CURRENT_NGINX_ENSITE_COMMIT=$(grep "Nginx-ensite commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
|
||||
if [[ "$CURRENT_NGINX_ENSITE_COMMIT" != "$NGINX_ENSITE_COMMIT" ]]; then
|
||||
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
|
||||
git stash
|
||||
|
|
Loading…
Reference in New Issue