修改: tool/update-upgrade/ss-update-controler.sh

修改:     tool/update-upgrade/ss-update-notify.sh
This commit is contained in:
shenmo 2022-04-11 00:40:28 +08:00
parent 69b42f2afe
commit ad53669098
2 changed files with 11 additions and 4 deletions

View File

@ -32,7 +32,7 @@ case $option in
if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then
echo "检测到已经启动了自动更新检测,关闭中"
sudo systemctl disable spark-update-notifier
rm /etc/xdg/autostart/spark-update-notifier.desktop
sudo rm /etc/xdg/autostart/spark-update-notifier.desktop
else
echo "未检测到自动更新检测,启动中"
@ -40,8 +40,8 @@ case $option in
sudo service spark-update-notifier start
# ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop $XDG_CONFIG_HOME/autostart
#
ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart
/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh
sudo ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart
/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh now
fi
;;

View File

@ -1,11 +1,18 @@
#!/bin/bash
set -e
isexistnumber=0
if [ "$1" = "now" ];then
update_app_number=`cat /tmp/spark-store-updatenum/number`
echo "$update_app_number"
notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
exit 0
fi
until [ $isexistnumber -eq 1 ];do
if [ -f /tmp/spark-store-updatenum/number ];then
sleep 10
update_app_number=`cat /tmp/spark-store-updatenum/number`
echo "$update_app_number"
sleep 10
notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
isexistnumber=1
fi