修复自提权更新问题

This commit is contained in:
2024-09-24 11:27:53 +08:00
parent 0380bc4a05
commit 9e7e957f4f
6 changed files with 16 additions and 8 deletions

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Spark Store</vendor>
<icon_name>x-package-repository</icon_name>
<action id="store.spark-app.ssinstall">
<description>运行ssinstall需要权限</description>
<message>要使用ssinstall需要权限</message>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/ssinstall</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,4 +1,8 @@
#!/bin/bash
if [ "$(id -u)" != "0" ] ; then
pkexec "$0" "$@"
exit
fi
trap "rm -f /tmp/spark-store/upgradeStatus.txt" EXIT
source /opt/durapps/spark-store/bin/bashimport/transhell.amber
load_transhell_debug