Customise postactiv logo

This commit is contained in:
Bob Mottram 2017-04-18 10:45:09 +01:00
parent ecf69ddd7f
commit 2dbbf8060a
2 changed files with 16 additions and 0 deletions

BIN
img/postactiv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -55,6 +55,20 @@ postactiv_variables=(ONION_ONLY
POSTACTIV_EXPIRE_MONTHS
POSTACTIV_TITLE)
function postactiv_customise_logo {
domain_name=$1
if [ -f /var/www/${domain_name}/htdocs/static/logo.png ]; then
if [ -f ~/freedombone/img/postactiv.png ]; then
cp ~/freedombone/img/postactiv.png /var/www/${domain_name}/htdocs/static/logo.png
else
if [ -f /home/$MY_USERNAME/freedombone/img/postactiv.png ]; then
cp /home/$MY_USERNAME/freedombone/img/postactiv.png /var/www/${domain_name}/htdocs/static/logo.png
fi
fi
fi
}
function remove_user_postactiv {
remove_username="$1"
@ -342,6 +356,7 @@ function upgrade_postactiv {
postactiv_running_script
upgrade_pleroma "$POSTACTIV_DOMAIN_NAME" "postactiv" "$POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_TITLE"
postactiv_customise_logo
install_gnusocial_default_background "postactiv" "$POSTACTIV_DOMAIN_NAME"
chown -R www-data:www-data /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs
}
@ -769,6 +784,7 @@ function install_postactiv {
install_nodejs pleroma-gnusocial
install_pleroma_front_end "postactiv" "$POSTACTIV_DOMAIN_NAME" "$POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_TITLE"
install_gnusocial_default_background "postactiv" "$POSTACTIV_DOMAIN_NAME"
postactiv_customise_logo
sed -i 's|"theme":.*|"theme": "base16-apathy.css",|g' /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/static/config.json
fi