Separate custom logo function for pleroma
This commit is contained in:
parent
775177fc8d
commit
4737a503a7
|
@ -766,6 +766,8 @@ function upgrade_pleroma {
|
|||
sudo -u pleroma mix deps.clean --build mime
|
||||
sudo -u pleroma mix ecto.migrate
|
||||
|
||||
#pleroma_custom_logo "$PLEROMA_DIR"
|
||||
|
||||
expire_pleroma_posts "$PLEROMA_DOMAIN_NAME" "$PLEROMA_EXPIRE_MONTHS"
|
||||
create_pleroma_blocklist
|
||||
|
||||
|
|
|
@ -95,6 +95,32 @@ function qvitter_update_background {
|
|||
fi
|
||||
}
|
||||
|
||||
function pleroma_custom_logo {
|
||||
basedir="$1"
|
||||
if [ "$2" ]; then
|
||||
if [[ "$2" == *".png" ]]; then
|
||||
cp "$2" "$basedir/priv/static/static/logo.png"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$basedir/static/logo.png" ]; then
|
||||
if [ -f "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
|
||||
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
|
||||
if [ -d "$basedir/priv/static/static" ]; then
|
||||
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
|
||||
fi
|
||||
else
|
||||
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
|
||||
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
|
||||
if [ -d "$basedir/priv/static/static" ]; then
|
||||
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function pleroma_set_background_image_from_url {
|
||||
basedir="$1"
|
||||
domain_name="$2"
|
||||
|
@ -157,22 +183,7 @@ function pleroma_set_background_image_from_url {
|
|||
return
|
||||
fi
|
||||
|
||||
# customise the logo
|
||||
if [ -f "$basedir/static/logo.png" ]; then
|
||||
if [ -f "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
|
||||
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
|
||||
if [ -d "$basedir/priv/static/static" ]; then
|
||||
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
|
||||
fi
|
||||
else
|
||||
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
|
||||
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
|
||||
if [ -d "$basedir/priv/static/static" ]; then
|
||||
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
pleroma_custom_logo "$basedir"
|
||||
|
||||
# customise the title
|
||||
if [ -f "$basedir/static/config.json" ]; then
|
||||
|
|
Loading…
Reference in New Issue