Setting pleroma background
This commit is contained in:
parent
240a9e9283
commit
3e8e274210
|
@ -240,7 +240,7 @@ function postactiv_set_background_image {
|
|||
if [ ${#temp_background} -gt 0 ]; then
|
||||
POSTACTIV_BACKGROUND_IMAGE_URL="$temp_background"
|
||||
write_config_param "POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_BACKGROUND_IMAGE_URL"
|
||||
if [[ $(pleroma_set_background_image_from_url "$POSTACTIV_DOMAIN_NAME" "$POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_TITLE") == "0" ]]; then
|
||||
if [[ $(pleroma_set_background_image_from_url "$POSTACTIV_DOMAIN_NAME" "$POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_TITLE" | tail -n 1) == "0" ]]; then
|
||||
dialog --title $"Set PostActiv background" \
|
||||
--msgbox $"The background image has been set" 6 60
|
||||
fi
|
||||
|
@ -518,7 +518,7 @@ function install_postactiv_main {
|
|||
postactiv_nginx_site=/etc/nginx/sites-available/$POSTACTIV_DOMAIN_NAME
|
||||
if [[ $ONION_ONLY == "no" ]]; then
|
||||
function_check nginx_http_redirect
|
||||
nginx_http_redirect $POSTACTIV_DOMAIN_NAME
|
||||
nginx_http_redirect $POSTACTIV_DOMAIN_NAME "index index.php"
|
||||
echo 'server {' >> $postactiv_nginx_site
|
||||
echo ' listen 443 ssl;' >> $postactiv_nginx_site
|
||||
echo ' listen [::]:443 ssl;' >> $postactiv_nginx_site
|
||||
|
|
|
@ -56,6 +56,12 @@ function pleroma_set_background_image_from_url {
|
|||
if [ -d /var/www/${domain_name}/htdocs/static ]; then
|
||||
cd /var/www/${domain_name}/htdocs/static
|
||||
|
||||
# remove any existing image
|
||||
if [ -f bg_custom.${ext} ]; then
|
||||
rm bg_custom.${ext}
|
||||
fi
|
||||
|
||||
# get the new image
|
||||
wget $url -O bg_custom.${ext}
|
||||
if [ ! -f bg_custom.${ext} ]; then
|
||||
echo "$url"
|
||||
|
@ -66,6 +72,9 @@ function pleroma_set_background_image_from_url {
|
|||
|
||||
sed -i "s|\"background\":.*|\"background\": \"bg_custom.${ext}\",|g" config.json
|
||||
fi
|
||||
else
|
||||
echo "2"
|
||||
return
|
||||
fi
|
||||
|
||||
# customise the logo
|
||||
|
|
Loading…
Reference in New Issue