From a46145aa52e547bf877d2751e237bbcfda700dd6 Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Wed, 19 Apr 2023 00:06:00 -0400 Subject: [PATCH] Add polkitd service --- config/polkitd.conf | 3 +++ sv/polkitd-log/consumer-for | 1 + sv/polkitd-log/notification-fd | 1 + sv/polkitd-log/pipeline-name | 1 + sv/polkitd-log/run | 9 +++++++++ sv/polkitd-log/timeout-down | 1 + sv/polkitd-log/type | 1 + sv/polkitd-srv/notification-fd | 1 + sv/polkitd-srv/producer-for | 1 + sv/polkitd-srv/run | 2 ++ sv/polkitd-srv/timeout-down | 1 + sv/polkitd-srv/type | 1 + 12 files changed, 23 insertions(+) create mode 100644 config/polkitd.conf create mode 100644 sv/polkitd-log/consumer-for create mode 100644 sv/polkitd-log/notification-fd create mode 100644 sv/polkitd-log/pipeline-name create mode 100644 sv/polkitd-log/run create mode 100644 sv/polkitd-log/timeout-down create mode 100644 sv/polkitd-log/type create mode 100644 sv/polkitd-srv/notification-fd create mode 100644 sv/polkitd-srv/producer-for create mode 100644 sv/polkitd-srv/run create mode 100644 sv/polkitd-srv/timeout-down create mode 100644 sv/polkitd-srv/type diff --git a/config/polkitd.conf b/config/polkitd.conf new file mode 100644 index 0000000..08282dc --- /dev/null +++ b/config/polkitd.conf @@ -0,0 +1,3 @@ +# This configures the directives used for s6-log in the log service. +DIRECTIVES="n3 s2000000 T" + diff --git a/sv/polkitd-log/consumer-for b/sv/polkitd-log/consumer-for new file mode 100644 index 0000000..e697c5c --- /dev/null +++ b/sv/polkitd-log/consumer-for @@ -0,0 +1 @@ +polkitd-srv diff --git a/sv/polkitd-log/notification-fd b/sv/polkitd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/polkitd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/polkitd-log/pipeline-name b/sv/polkitd-log/pipeline-name new file mode 100644 index 0000000..3ec993a --- /dev/null +++ b/sv/polkitd-log/pipeline-name @@ -0,0 +1 @@ +polkitd diff --git a/sv/polkitd-log/run b/sv/polkitd-log/run new file mode 100644 index 0000000..6e08d5d --- /dev/null +++ b/sv/polkitd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/polkitd.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/polkitd } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/polkitd +} +foreground { install -d -o s6log -g s6log /run/log/polkitd } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/polkitd diff --git a/sv/polkitd-log/timeout-down b/sv/polkitd-log/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/polkitd-log/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/polkitd-log/type b/sv/polkitd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/polkitd-log/type @@ -0,0 +1 @@ +longrun diff --git a/sv/polkitd-srv/notification-fd b/sv/polkitd-srv/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/polkitd-srv/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/polkitd-srv/producer-for b/sv/polkitd-srv/producer-for new file mode 100644 index 0000000..0f332b6 --- /dev/null +++ b/sv/polkitd-srv/producer-for @@ -0,0 +1 @@ +polkitd-log diff --git a/sv/polkitd-srv/run b/sv/polkitd-srv/run new file mode 100644 index 0000000..a22a1c5 --- /dev/null +++ b/sv/polkitd-srv/run @@ -0,0 +1,2 @@ +#!/bin/execlineb +exec /usr/pkg/lib/polkit-1/polkitd --no-debug diff --git a/sv/polkitd-srv/timeout-down b/sv/polkitd-srv/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/polkitd-srv/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/polkitd-srv/type b/sv/polkitd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/polkitd-srv/type @@ -0,0 +1 @@ +longrun