Skip to content

Commit a574878

Browse files
cserbyclaude
andcommitted
fix(linux): address PR AprilNEA#173 review comments
- install.sh: rewrite ExecStart in the systemd unit via sed so the installed service always points to $BINDIR/openlogi-agent, not the hardcoded /usr/bin path (which mismatches the default /usr/local prefix) - uninstall.sh: add udevadm trigger after reload so hidraw and uinput nodes lose the uaccess tag immediately, not only after re-plug/reboot Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fccec7a commit a574878

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

β€Žpackaging/linux/install.shβ€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ fi
9191
SYSTEMD_UNIT_DIR=/usr/lib/systemd/user
9292
if [ -d "$SYSTEMD_UNIT_DIR" ] || command -v systemctl > /dev/null 2>&1; then
9393
echo "Installing systemd user unit …"
94-
sudo install -Dm644 "${SCRIPT_DIR}/systemd/openlogi-agent.service" \
95-
"${SYSTEMD_UNIT_DIR}/openlogi-agent.service"
94+
# Rewrite ExecStart to match the actual install prefix so the service finds
95+
# the binary regardless of whether --prefix was passed.
96+
sudo install -Dm644 /dev/null "${SYSTEMD_UNIT_DIR}/openlogi-agent.service"
97+
sed "s|ExecStart=.*|ExecStart=${BINDIR}/openlogi-agent|" \
98+
"${SCRIPT_DIR}/systemd/openlogi-agent.service" \
99+
| sudo tee "${SYSTEMD_UNIT_DIR}/openlogi-agent.service" > /dev/null
96100
echo "Enable the agent for your user with:"
97101
echo " systemctl --user enable --now openlogi-agent.service"
98102
fi

β€Žpackaging/linux/uninstall.shβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ echo "Removing udev rules …"
3838
sudo rm -f /etc/udev/rules.d/70-openlogi.rules
3939
if command -v udevadm > /dev/null 2>&1; then
4040
sudo udevadm control --reload-rules
41+
sudo udevadm trigger --subsystem-match=hidraw
42+
sudo udevadm trigger --subsystem-match=misc --attr-match=name=uinput 2>/dev/null || true
4143
fi
4244

4345
# ── systemd user unit ─────────────────────────────────────────────────────────

0 commit comments

Comments
Β (0)