diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-01-30 11:09:15 +0100 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-03-27 16:31:58 +0200 |
commit | 7c3ab7b3ab2afde645c1eb135f2ef8dbae5774d3 (patch) | |
tree | 6dc095bdb04de5425275c38e4d679c579aed4c10 | |
parent | f2ff89e8bc5960feff174bd1f26b97bd72998e21 (diff) | |
download | libproxy-git-7c3ab7b3ab2afde645c1eb135f2ef8dbae5774d3.tar.gz |
Add dbus service files (#21)
Add proxyd service file and install it to systemd user dir.
-rw-r--r-- | src/backend/dbus/meson.build | 20 | ||||
-rw-r--r-- | src/backend/dbus/proxyd.service.in | 18 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/backend/dbus/meson.build b/src/backend/dbus/meson.build index 5222a5f..8ab3bfe 100644 --- a/src/backend/dbus/meson.build +++ b/src/backend/dbus/meson.build @@ -1,6 +1,12 @@ if get_option('dbus') gdbus_codegen = find_program('gdbus-codegen') + unitdir = '' + systemd = dependency('systemd', required: false) + if systemd.found() + unitdir = systemd.get_variable(pkgconfig: 'systemduserunitdir') + endif + px_interface = [ 'org.libproxy.proxy.xml' ] @@ -43,6 +49,20 @@ if get_option('dbus') 'proxyd', proxyd_sources, dependencies: proxyd_deps, + install_dir: join_paths(px_prefix, get_option('libexecdir')), install: true, ) + + service_data = configuration_data() + service_data.set('LIBEXECDIR', join_paths(px_prefix, get_option('libexecdir'))) + + service = configure_file( + input: 'proxyd.service.in', + output: 'proxyd.service', + configuration: service_data + ) + + if unitdir != '' + install_data(service, install_dir: unitdir) + endif endif diff --git a/src/backend/dbus/proxyd.service.in b/src/backend/dbus/proxyd.service.in new file mode 100644 index 0000000..2e2a7cc --- /dev/null +++ b/src/backend/dbus/proxyd.service.in @@ -0,0 +1,18 @@ +[Unit] +Description=Libproxy user service + +[Service] +Type=dbus +BusName=org.libproxy.proxy +ExecStart=@LIBEXECDIR@/proxyd +#Environment="G_MESSAGES_DEBUG=all" +Restart=on-failure + +MemoryDenyWriteExecute=yes +PrivateTmp=yes +ProtectHome=yes +ProtectSystem=full +RestrictRealtime=yes + +[Install] +WantedBy=default.target
\ No newline at end of file |