summary refs log tree commit diff
path: root/os/etc/s6-rc/src/snooze
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2023-09-25 11:56:34 +0200
committerRobert Günzler <r@gnzler.io>2023-09-25 11:56:34 +0200
commitf5c219983c0f60a07f1bd52b6f6071e86f35455e (patch)
treeb7520a02b9822481f29aea4ccb404744a73414b1 /os/etc/s6-rc/src/snooze
parent91ba318df1ff9b04d08af373ae904f61a91bf489 (diff)
add os config
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '')
-rw-r--r--os/etc/s6-rc/src/snooze-daily/producer-for1
-rw-r--r--os/etc/s6-rc/src/snooze-daily/run8
-rw-r--r--os/etc/s6-rc/src/snooze-daily/type1
-rw-r--r--os/etc/s6-rc/src/snooze-hourly/producer-for1
-rw-r--r--os/etc/s6-rc/src/snooze-hourly/run8
-rw-r--r--os/etc/s6-rc/src/snooze-hourly/type1
-rw-r--r--os/etc/s6-rc/src/snooze-log/consumer-for2
-rw-r--r--os/etc/s6-rc/src/snooze-log/notification-fd1
-rw-r--r--os/etc/s6-rc/src/snooze-log/run9
-rw-r--r--os/etc/s6-rc/src/snooze-log/type1
-rw-r--r--os/etc/s6-rc/src/snooze/contents.d/snooze-daily0
-rw-r--r--os/etc/s6-rc/src/snooze/contents.d/snooze-hourly0
-rw-r--r--os/etc/s6-rc/src/snooze/type1
13 files changed, 34 insertions, 0 deletions
diff --git a/os/etc/s6-rc/src/snooze-daily/producer-for b/os/etc/s6-rc/src/snooze-daily/producer-for
new file mode 100644
index 0000000..78f2503
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-daily/producer-for
@@ -0,0 +1 @@
+snooze-log
diff --git a/os/etc/s6-rc/src/snooze-daily/run b/os/etc/s6-rc/src/snooze-daily/run
new file mode 100644
index 0000000..f7e8300
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-daily/run
@@ -0,0 +1,8 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+
+foreground { mkdir -p /run/snooze }
+
+exec snooze -s 1d -t /run/snooze/daily -- execlineb -c \
+	"foreground { pipeline { test -d /etc/cron.daily } run-parts -v /etc/cron.daily } touch /run/snooze/daily"
diff --git a/os/etc/s6-rc/src/snooze-daily/type b/os/etc/s6-rc/src/snooze-daily/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-daily/type
@@ -0,0 +1 @@
+longrun
diff --git a/os/etc/s6-rc/src/snooze-hourly/producer-for b/os/etc/s6-rc/src/snooze-hourly/producer-for
new file mode 100644
index 0000000..78f2503
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-hourly/producer-for
@@ -0,0 +1 @@
+snooze-log
diff --git a/os/etc/s6-rc/src/snooze-hourly/run b/os/etc/s6-rc/src/snooze-hourly/run
new file mode 100644
index 0000000..af80a9c
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-hourly/run
@@ -0,0 +1,8 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+
+foreground { mkdir -p /run/snooze }
+
+exec snooze -v -H * -s 1h -t /run/snooze/hourly execlineb -c \
+	"foreground { pipeline { test -d /etc/cron.hourly } run-parts -v /etc/cron.hourly } touch /run/snooze/hourly"
diff --git a/os/etc/s6-rc/src/snooze-hourly/type b/os/etc/s6-rc/src/snooze-hourly/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-hourly/type
@@ -0,0 +1 @@
+longrun
diff --git a/os/etc/s6-rc/src/snooze-log/consumer-for b/os/etc/s6-rc/src/snooze-log/consumer-for
new file mode 100644
index 0000000..26b0e15
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-log/consumer-for
@@ -0,0 +1,2 @@
+snooze-daily
+snooze-hourly
diff --git a/os/etc/s6-rc/src/snooze-log/notification-fd b/os/etc/s6-rc/src/snooze-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/os/etc/s6-rc/src/snooze-log/run b/os/etc/s6-rc/src/snooze-log/run
new file mode 100644
index 0000000..b1a8be7
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-log/run
@@ -0,0 +1,9 @@
+#!/bin/execlineb -P
+
+envfile /etc/s6-rc/config/log.conf
+envfile -I /etc/s6-rc/config/snooze.conf
+importas -sCuD "n2 s2000000 T" LOG_DIRECTIVES LOG_DIRECTIVES
+importas -sCuD "/run/log" LOG_DIR LOG_DIR
+
+foreground { install -d ${LOG_DIR}/snooze }
+s6-log -d3 -b -- ${LOG_DIRECTIVES} ${LOG_DIR}/snooze
diff --git a/os/etc/s6-rc/src/snooze-log/type b/os/etc/s6-rc/src/snooze-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/os/etc/s6-rc/src/snooze/contents.d/snooze-daily b/os/etc/s6-rc/src/snooze/contents.d/snooze-daily
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze/contents.d/snooze-daily
diff --git a/os/etc/s6-rc/src/snooze/contents.d/snooze-hourly b/os/etc/s6-rc/src/snooze/contents.d/snooze-hourly
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze/contents.d/snooze-hourly
diff --git a/os/etc/s6-rc/src/snooze/type b/os/etc/s6-rc/src/snooze/type
new file mode 100644
index 0000000..757b422
--- /dev/null
+++ b/os/etc/s6-rc/src/snooze/type
@@ -0,0 +1 @@
+bundle