install: update location of policy-rules script

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-09-05 07:34:54 -04:00
parent 8df98908ca
commit d1c2dcca0b

View File

@ -279,8 +279,9 @@ check_polkit_rules()
report_status "Installing PolKit Rules"
polkit_script="${SRCDIR}/scripts/set-policykit-rules.sh"
if [ $IS_SRC_DIST != "y" ]; then
polkit_script="${PYTHONDIR}/share/moonraker"
polkit_script="${polkit_script}/scripts/set-policykit-rules.sh"
py_bin="$PYTHONDIR/bin/python"
pkg_path="$( $py_bin -c 'import moonraker; print(moonraker.__path__[0])')"
polkit_script="${pkg_path}/scripts/set-policykit-rules.sh"
fi
if [ -f "$polkit_script" ]; then
set +e