Browse Source

Customise postactiv logo

jessie
Bob Mottram 4 years ago
parent
commit
2dbbf8060a
2 changed files with 16 additions and 0 deletions
  1. BIN
      img/postactiv.png
  2. + 16
    - 0
      src/freedombone-app-postactiv

BIN
img/postactiv.png

Before After
Width: 96  |  Height: 96  |  Size: 1.8 KiB

+ 16
- 0
src/freedombone-app-postactiv

@ -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

Loading…
Cancel
Save