侧边栏壁纸
  • 累计撰写 81 篇文章
  • 累计创建 50 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

群晖DSM7改BING登录界面,并且透明化登录框

shawn
2023-09-02 / 0 评论 / 0 点赞 / 6 阅读 / 3410 字

群晖DSM7改BING登录界面,并且透明化登录框

1. bing背景

进入群晖-任务计划,输入代码:

#如需收集每日美图去掉下面注释设置保存文件夹路径,在FileStation里面右键文件夹属性可以看到路径
#savepath="/volume2/download/BingWallpaper"
#下载Bing图片
pic=$(wget -t 5 --no-check-certificate -qO- "<https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1>")
echo $pic|grep -q enddate||exit
link=$(echo <https://www.bing.com$>(echo $pic|sed 's/.\\\\+"url"[:" ]\\\\+//g'|sed 's/".\\\\+//g'))
date=$(echo $pic|sed 's/.\\\\+enddate[": ]\\\\+//g'|grep -Eo 2[0-9]{7}|head -1)
tmpfile=/tmp/$date"_bing.jpg"
wget -t 5 --no-check-certificate $link -qO $tmpfile
[ -s $tmpfile ]||exit
rm -rf /usr/syno/etc/login_background*.jpg
cp -f $tmpfile /usr/syno/etc/login_background.jpg &>/dev/null
cp -f $tmpfile /usr/syno/etc/login_background_hd.jpg &>/dev/null
cp -f $tmpfile /usr/syno/synoman/webman/resources/images/1x/default_login_background/dsm7_01.jpg &>/dev/null
cp -f $tmpfile /usr/syno/synoman/webman/resources/images/2x/default_login_background/dsm7_01.jpg &>/dev/null
title=$(echo $pic|sed 's/.\\\\+"title":"//g'|sed 's/".\\\\+//g')
copyright=$(echo $pic|sed 's/.\\\\+"copyright[:" ]\\\\+//g'|sed 's/".\\\\+//g')
word=$(echo $copyright|sed 's/(.\\\\+//g')
if [ ! -n "$title" ];then
cninfo=$(echo $copyright|sed 's/,/"/g'|sed 's/,/"/g'|sed 's/(/"/g'|sed 's/ //g'|sed 's/\\\\//_/g'|sed 's/)//g')
title=$(echo $cninfo|cut -d'"' -f1)
word=$(echo $cninfo|cut -d'"' -f2)
fi
#将图片应用于登陆界面
sed -i s/login_background_customize=.*//g /etc/synoinfo.conf
echo "login_background_customize=\\\\"yes\\\\"">>/etc/synoinfo.conf
sed -i s/login_welcome_title=.*//g /etc/synoinfo.conf
echo "login_welcome_title=\\\\"$title\\\\"">>/etc/synoinfo.conf
sed -i s/login_welcome_msg=.*//g /etc/synoinfo.conf
echo "login_welcome_msg=\\\\"$word\\\\"">>/etc/synoinfo.conf
#将图片保存到指定路径
if (echo $savepath|grep -q '/') then
cp -f $tmpfile "$savepath/$date@$title-$word.jpg"
fi
#清除临时文件
rm -rf /tmp/*_bing.jpg

2. 透明登录框修改

进入群晖-任务计划,输入代码:

cd /usr/syno/synoman/webman/login/dist/
cp style.css style.css-bak
cp style.css.gz style.css.gz-bak
rm -rf style.css
rm -rf style.css.gz
wget <https://wp.gxnas.com/wp-content/uploads/2022/09/style.css>
wget <https://wp.gxnas.com/wp-content/uploads/2022/09/style.css.gz>
chmod 755 style.css
chmod 755 style.css.gz

3. 透明登录框恢复正常

进入群晖-任务计划,输入代码:

cd /usr/syno/synoman/webman/login/dist/
rm -rf style.css
rm -rf style.css.gz
cp style.css-bak style.css
cp style.css.gz-bak style.css.gz
chmod 755 style.css
chmod 755 style.css.gz
0

评论区