Qvitter microblog theme

This commit is contained in:
Bob Mottram 2016-02-03 17:57:11 +00:00
parent ec61b1646a
commit 103714d88c
1 changed files with 43 additions and 0 deletions

View File

@ -197,6 +197,8 @@ MICROBLOG_ONION_PORT=8087
MICROBLOG_REPO="https://git.gnu.io/gnu/gnu-social.git" MICROBLOG_REPO="https://git.gnu.io/gnu/gnu-social.git"
MICROBLOG_ADMIN_PASSWORD= MICROBLOG_ADMIN_PASSWORD=
GNUSOCIAL_COMMIT='94392ab00ceefec6105ac7d6e6846fb644bbd0f1' GNUSOCIAL_COMMIT='94392ab00ceefec6105ac7d6e6846fb644bbd0f1'
MICROBLOG_THEME_REPO="https://git.gnu.io/h2p/Qvitter.git"
MICROBLOG_THEME_COMMIT='8abbdeb3c0a6a34754411452ae832d2f19cef7ab'
# Domain name for hubzilla installation # Domain name for hubzilla installation
HUBZILLA_DOMAIN_NAME= HUBZILLA_DOMAIN_NAME=
@ -8576,6 +8578,46 @@ function install_gnu_social {
echo 'install_gnu_social' >> $COMPLETION_FILE echo 'install_gnu_social' >> $COMPLETION_FILE
} }
function install_gnu_social_theme {
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return
fi
# update to the next commit
if [ -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins ]; then
if grep -q "GNU Social theme commit" $COMPLETION_FILE; then
CURRENT_GNUSOCIAL_THEME_COMMIT=$(grep "GNU Social theme commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
if [[ "$CURRENT_GNUSOCIAL_THEME_COMMIT" != "$GNUSOCIAL_THEME_COMMIT" ]]; then
cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins
git_pull $MICROBLOG_THEME_REPO $GNUSOCIAL_THEME_COMMIT
sed -i "s/GNU Social theme commit.*/GNU Social theme commit:$GNUSOCIAL_THEME_COMMIT/g" $COMPLETION_FILE
chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local
fi
else
echo "GNU Social theme commit:$GNUSOCIAL_THEME_COMMIT" >> $COMPLETION_FILE
fi
fi
if grep -Fxq "install_gnu_social_theme" $COMPLETION_FILE; then
return
fi
if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins ]; then
mkdir -p /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins
fi
git_clone $MICROBLOG_THEME_REPO $GNUSOCIAL_THEME_COMMIT
if ! grep -q "addPlugin('Qvitter')" /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php; then
echo "addPlugin('Qvitter');" >> /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php
fi
chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
#MICROBLOG_THEME_REPO
echo 'install_gnu_social_theme' >> $COMPLETION_FILE
}
function install_hubzilla { function install_hubzilla {
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return return
@ -10028,6 +10070,7 @@ install_wiki
install_blog install_blog
mark_blog_domain mark_blog_domain
install_gnu_social install_gnu_social
install_gnu_social_theme
install_hubzilla install_hubzilla
install_dlna_server install_dlna_server
configure_firewall_for_dlna configure_firewall_for_dlna