优化uengine-loading-ubuntu

This commit is contained in:
gfdgd_xi 2023-01-19 13:09:04 +08:00
parent 01d73eb2ab
commit 31305aaf0a
2 changed files with 47 additions and 2 deletions

View File

@ -1,4 +1,12 @@
#/bin/bash
echo 送杜少府之任蜀州
echo 城阙辅三秦,风烟望五津。
echo 与君离别意,同是宦游人。
echo 海内存知己,天涯若比邻。
echo 无为在歧路,儿女共沾巾。
echo
echo 译文:巍巍长安,雄踞三秦之地;渺渺四川,却在迢迢远方。你我命运何等相仿,奔波仕途,远离家乡。只要有知心朋友,四海之内不觉遥远。即便在天涯海角,感觉就像近邻一样。岔道分手,实在不用儿女情长,泪洒衣裳。
echo =========================
find . -name '*.deb' | xargs sudo dpkg -i
sudo apt-mark hold lxc lxc-templates liblxc1 liblxc-common lxc-utils
sudo apt install -f -y

View File

@ -1,4 +1,30 @@
#/bin/bash
# 狗头
echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`***,@@@@@@@@'
echo '@@@@^*****,\@@@@@@@@@@@@@@@@@@@@`*.....*\@@@@@@'
echo '@@@@*.......**\@[`***......*****.....*..*\@@@@@'
echo '@@@@^*..............................***...@@@@@'
echo '@@@@@*...............................**..*\@@@@'
echo '@@@@@^*..*............................*..*=@@@@'
echo '@@@@@^**................................**=@@@@'
echo '@@@@@/*..................................*=@@@@'
echo '@@@@@*..... ..... ............*@@@@'
echo '@@@@`*. .]]]]` ... ]/[[[O/O]`........*,@@@'
echo '@@@@*.=` =O.,OO......=` .OOOOOO^........*@@@'
echo '@@@^*.\ =OOOOO^.....=` .OOOOOO^........*=@@'
echo '@@@^*..,\].=OO/.........,[\]]O/[` ......*=@@'
echo '@@@@*...................... .*@@@'
echo '@@@@`. ......,]]...... .,@@@'
echo '@@@@@*. OOOOOOO^ .*@@@@'
echo '@@@@@\*. \OOOO` .*/@@@@'
echo '@@@@@@\*. =. / .*/@@@@@'
echo '@@@@@@@@`*. ,\OOOOOOO]]OO` .*,@@@@@@@'
echo '@@@@@@@@@@`*. . .*,@@@@@@@@@'
echo '@@@@@@@@@@@@\**.. ......... ..**/@@@@@@@@@@@'
echo '@@@@@@@@@@@@@@@@]`***......***,]@@@@@@@@@@@@@@@'
echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
# 使 UEngine 能在 Wayland 下运行
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=xcb
@ -20,14 +46,25 @@ if [[ $? != 0 ]]; then
exit
fi
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务启动完成" -a uengine-runner
bad=0
# 守护进程,防止异常退出
while [[ true ]]; do
uengine session-manager -platformtheme=deepin
# 让用户可以强制结束
if [[ -f "/tmp/uengine-loading-ubuntu-end" ]]; then
rm /tmp/uengine-loading-ubuntu-end
echo UEngine 服务异常崩溃,不再重启服务
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常崩溃,不再重启服务" -a uengine-runner
break
exit
fi
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常结束,重新启动" -a uengine-runner
if [[ $bad -gt 9 ]]; then
# 错误次数太多,结束
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常崩溃次数过多,不再重启服务" -a uengine-runner
echo UEngine 服务异常崩溃次数过多,不再重启服务
exit
fi
bad=$(($bad+1))
echo "UEngine 服务异常结束,重新启动($bad次"
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常结束,重新启动($bad次" -a uengine-runner
done