Also change pleroma background image in a separate static subdirectory
This commit is contained in:
parent
0b47e814e7
commit
aa5feabc51
|
@ -309,6 +309,7 @@ function pleroma_set_title {
|
|||
PLEROMA_DOMAIN_NAME=$(get_completion_param "pleroma domain")
|
||||
write_config_param "PLEROMA_TITLE" "$PLEROMA_TITLE"
|
||||
sed -i "s|\"name\":.*|\"name\": \"${PLEROMA_TITLE}\",|g" $PLEROMA_DIR/static/config.json
|
||||
sed -i "s|\"name\":.*|\"name\": \"${PLEROMA_TITLE}\",|g" $PLEROMA_DIR/priv/static/static/config.json
|
||||
sed -i "s|name: .*|name: \"${PLEROMA_TITLE}\",|g" $PLEROMA_DIR/config/config.exs
|
||||
systemctl restart pleroma
|
||||
dialog --title $"Set Pleroma title" \
|
||||
|
|
|
@ -133,6 +133,11 @@ function pleroma_set_background_image_from_url {
|
|||
chown www-data:www-data static/bg_custom.${ext}
|
||||
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.${ext}\",|g" static/config.json
|
||||
fi
|
||||
if [ -d priv/static/static ]; then
|
||||
cp bg_custom.${ext} priv/static/static/bg_custom.${ext}
|
||||
chown www-data:www-data priv/static/static/bg_custom.${ext}
|
||||
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.${ext}\",|g" priv/static/static/config.json
|
||||
fi
|
||||
|
||||
if [[ "$basedir" != $PLEROMA_DIR ]]; then
|
||||
qvitter_update_background ${domain_name} ${ext}
|
||||
|
@ -148,9 +153,15 @@ function pleroma_set_background_image_from_url {
|
|||
if [ -f $basedir/static/logo.png ]; then
|
||||
if [ -f ~/freedombone/img/logo_fbone3.png ]; then
|
||||
cp ~/freedombone/img/logo_fbone3.png $basedir/static/logo.png
|
||||
if [ -d $basedir/priv/static/static ]; then
|
||||
cp ~/freedombone/img/logo_fbone3.png $basedir/priv/static/static/logo.png
|
||||
fi
|
||||
else
|
||||
if [ -f /home/$MY_USERNAME/freedombone/img/logo_fbone3.png ]; then
|
||||
cp /home/$MY_USERNAME/freedombone/img/logo_fbone3.png $basedir/static/logo.png
|
||||
if [ -d $basedir/priv/static/static ]; then
|
||||
cp /home/$MY_USERNAME/freedombone/img/logo_fbone3.png $basedir/priv/static/static/logo.png
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -159,6 +170,9 @@ function pleroma_set_background_image_from_url {
|
|||
if [ -f $basedir/static/config.json ]; then
|
||||
sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" $basedir/static/config.json
|
||||
fi
|
||||
if [ -f $basedir/priv/static/static/config.json ]; then
|
||||
sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" $basedir/priv/static/static/config.json
|
||||
fi
|
||||
|
||||
echo "0"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue