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 $wallpaper|grep -q '/') then
cp -f $tmpfile $wallpaper
fi
#注意:7.0版本新增了一个hd结尾的壁纸,需要同步替换
if (echo $wallpaper_hd|grep -q '/') then
cp -f $tmpfile $wallpaper_hd
fi
#复制图片到保存文件夹
if (echo $savepath|grep -q '/') then
cp -f $tmpfile $savepath/$date@$title-$word.jpg
#修改图片的权限
chown $user:users $savepath/$date@$title-$word.jpg
#为保存的图片建立索引
synoindex -a $savepath/$date@$title-$word.jpg
fi
rm -rf /tmp/*_bing.jpg