dbus: add a service

This commit is contained in:
Vaxry 2024-10-16 15:27:44 +01:00
parent d17cf7eb9c
commit b54db9cf57
2 changed files with 18 additions and 0 deletions

View file

@ -52,4 +52,11 @@ target_link_libraries(hyprpolkitagent
include(GNUInstallDirs)
set(LIBEXECDIR ${CMAKE_INSTALL_FULL_LIBEXECDIR})
configure_file(assets/hyprpolkitagent-service.in hyprpolkitagent.service @ONLY)
install(TARGETS hyprpolkitagent DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
install(FILES ${CMAKE_BINARY_DIR}/hyprpolkitagent.service
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services")
install(FILES ${CMAKE_BINARY_DIR}/hyprpolkitagent.service
DESTINATION "lib/systemd/user")

View file

@ -0,0 +1,11 @@
[Unit]
Description=Hyprland Polkit Authentication Agent
PartOf=graphical-session.target
After=graphical-session.target
ConditionEnvironment=WAYLAND_DISPLAY
[Service]
ExecStart=@LIBEXECDIR@/hyprpolkitagent
Slice=session.slice
TimeoutStopSec=5sec
Restart=on-failure