Skip to content
Snippets Groups Projects
Commit 49e69bec authored by Bob Mottram's avatar Bob Mottram
Browse files

Update the way that pleroma background is set

parent f9e834d0
No related branches found
No related tags found
No related merge requests found
......@@ -504,6 +504,8 @@ function pleroma_create_config {
domain_port=80
fi
pleroma_background_image='aurora_borealis.jpg'
{ echo 'use Mix.Config';
echo '';
echo 'config :pleroma, Pleroma.Web.Endpoint,';
......@@ -551,7 +553,7 @@ function pleroma_create_config {
echo ' logo: "/static/logo.png",';
echo ' logo_mask: true,';
echo ' logo_margin: "0.1em",';
echo " background: \"/static/aurora_borealis.jpg\",";
echo " background: \"/static/$pleroma_background_image\",";
echo ' redirect_root_no_login: "/main/all",';
echo ' redirect_root_login: "/main/friends",';
echo ' show_instance_panel: true,';
......
......@@ -164,11 +164,17 @@ function pleroma_set_background_image_from_url {
cp "bg_custom.${ext}" "static/bg_custom.${ext}"
chown www-data:www-data "static/bg_custom.${ext}"
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.${ext}\",|g" static/config.json
if [ -f "$pleroma_secret" ]; then
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.${ext}\",|g" "$pleroma_secret"
fi
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
if [ -f "$pleroma_secret" ]; then
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.${ext}\",|g" "$pleroma_secret"
fi
fi
if [[ "$basedir" != "$PLEROMA_DIR" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment