From 980c5408489a3a3a56e49c3873f1bce6a0155cad Mon Sep 17 00:00:00 2001 From: PS Date: Sun, 1 Feb 2026 12:02:03 +0100 Subject: version 0.2.0.0 --- src/lib/service/system/.s6-svscan/SIGINT | 5 +++++ src/lib/service/system/.s6-svscan/SIGPWR | 5 +++++ src/lib/service/system/.s6-svscan/SIGQUIT | 2 ++ src/lib/service/system/.s6-svscan/SIGTERM | 2 ++ src/lib/service/system/.s6-svscan/SIGUSR1 | 5 +++++ src/lib/service/system/.s6-svscan/SIGUSR2 | 5 +++++ src/lib/service/system/.s6-svscan/SIGWINCH | 2 ++ src/lib/service/system/.s6-svscan/crash | 10 ++++++++++ src/lib/service/system/.s6-svscan/finish | 9 +++++++++ src/lib/service/system/goetia-runner/notification-fd | 1 + src/lib/service/system/goetia-runner/run | 10 ++++++++++ .../service/system/s6-svscan-log-console/notification-fd | 1 + src/lib/service/system/s6-svscan-log-console/run | 16 ++++++++++++++++ src/lib/service/system/s6-svscan-log/notification-fd | 1 + src/lib/service/system/s6-svscan-log/run | 15 +++++++++++++++ 15 files changed, 89 insertions(+) create mode 100755 src/lib/service/system/.s6-svscan/SIGINT create mode 100755 src/lib/service/system/.s6-svscan/SIGPWR create mode 100755 src/lib/service/system/.s6-svscan/SIGQUIT create mode 100755 src/lib/service/system/.s6-svscan/SIGTERM create mode 100755 src/lib/service/system/.s6-svscan/SIGUSR1 create mode 100755 src/lib/service/system/.s6-svscan/SIGUSR2 create mode 100755 src/lib/service/system/.s6-svscan/SIGWINCH create mode 100755 src/lib/service/system/.s6-svscan/crash create mode 100755 src/lib/service/system/.s6-svscan/finish create mode 100644 src/lib/service/system/goetia-runner/notification-fd create mode 100755 src/lib/service/system/goetia-runner/run create mode 100644 src/lib/service/system/s6-svscan-log-console/notification-fd create mode 100755 src/lib/service/system/s6-svscan-log-console/run create mode 100644 src/lib/service/system/s6-svscan-log/notification-fd create mode 100755 src/lib/service/system/s6-svscan-log/run (limited to 'src/lib/service/system') diff --git a/src/lib/service/system/.s6-svscan/SIGINT b/src/lib/service/system/.s6-svscan/SIGINT new file mode 100755 index 0000000..7b00dd5 --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGINT @@ -0,0 +1,5 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +system-shutdown -r diff --git a/src/lib/service/system/.s6-svscan/SIGPWR b/src/lib/service/system/.s6-svscan/SIGPWR new file mode 100755 index 0000000..b7e4956 --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGPWR @@ -0,0 +1,5 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +system-shutdown -p diff --git a/src/lib/service/system/.s6-svscan/SIGQUIT b/src/lib/service/system/.s6-svscan/SIGQUIT new file mode 100755 index 0000000..4d6fd2f --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGQUIT @@ -0,0 +1,2 @@ +#!@shebangdir@/execlineb -P + diff --git a/src/lib/service/system/.s6-svscan/SIGTERM b/src/lib/service/system/.s6-svscan/SIGTERM new file mode 100755 index 0000000..4d6fd2f --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGTERM @@ -0,0 +1,2 @@ +#!@shebangdir@/execlineb -P + diff --git a/src/lib/service/system/.s6-svscan/SIGUSR1 b/src/lib/service/system/.s6-svscan/SIGUSR1 new file mode 100755 index 0000000..b7e4956 --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGUSR1 @@ -0,0 +1,5 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +system-shutdown -p diff --git a/src/lib/service/system/.s6-svscan/SIGUSR2 b/src/lib/service/system/.s6-svscan/SIGUSR2 new file mode 100755 index 0000000..cf21071 --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGUSR2 @@ -0,0 +1,5 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +system-shutdown -h diff --git a/src/lib/service/system/.s6-svscan/SIGWINCH b/src/lib/service/system/.s6-svscan/SIGWINCH new file mode 100755 index 0000000..4d6fd2f --- /dev/null +++ b/src/lib/service/system/.s6-svscan/SIGWINCH @@ -0,0 +1,2 @@ +#!@shebangdir@/execlineb -P + diff --git a/src/lib/service/system/.s6-svscan/crash b/src/lib/service/system/.s6-svscan/crash new file mode 100755 index 0000000..9fa8bd4 --- /dev/null +++ b/src/lib/service/system/.s6-svscan/crash @@ -0,0 +1,10 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +redirfd -w 2 /dev/console +fdmove -c 1 2 + +foreground { echo "s6-svscan crashed. Rebooting." } + +linux-powertool -r diff --git a/src/lib/service/system/.s6-svscan/finish b/src/lib/service/system/.s6-svscan/finish new file mode 100755 index 0000000..fa3654c --- /dev/null +++ b/src/lib/service/system/.s6-svscan/finish @@ -0,0 +1,9 @@ +#!@shebangdir@/execlineb -P + + +redirfd -w 2 /dev/console +fdmove -c 1 2 + +foreground { echo "s6-svscan exited. Rebooting." } + +linux-powertool -r diff --git a/src/lib/service/system/goetia-runner/notification-fd b/src/lib/service/system/goetia-runner/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/src/lib/service/system/goetia-runner/notification-fd @@ -0,0 +1 @@ +3 diff --git a/src/lib/service/system/goetia-runner/run b/src/lib/service/system/goetia-runner/run new file mode 100755 index 0000000..faf8623 --- /dev/null +++ b/src/lib/service/system/goetia-runner/run @@ -0,0 +1,10 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +fdmove -c 2 1 +fdmove 1 3 + +s6-ipcserver -1 -a 0700 -c 1 -- s + +s6-sudod -dt30000 -- diff --git a/src/lib/service/system/s6-svscan-log-console/notification-fd b/src/lib/service/system/s6-svscan-log-console/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/src/lib/service/system/s6-svscan-log-console/notification-fd @@ -0,0 +1 @@ +3 diff --git a/src/lib/service/system/s6-svscan-log-console/run b/src/lib/service/system/s6-svscan-log-console/run new file mode 100755 index 0000000..63d32ba --- /dev/null +++ b/src/lib/service/system/s6-svscan-log-console/run @@ -0,0 +1,16 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +fdmove -c 1 2 +redirfd -a 1 /dev/console + +if { mkdir -p -m750 -- @tmpfsdir@/@sysrundir@/log/uncaught-logs } +# fifo is created in prepare-svscan +if { chown -R @loguser@:@loguser@ @tmpfsdir@/@sysrundir@/log fifo } + +s6-setuidgid @loguser@ + +redirfd -rnb 0 fifo + +s6-log -bpd3 -- 1 @logconfig@ @tmpfsdir@/@sysrundir@/log/uncaught-logs diff --git a/src/lib/service/system/s6-svscan-log/notification-fd b/src/lib/service/system/s6-svscan-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/src/lib/service/system/s6-svscan-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/src/lib/service/system/s6-svscan-log/run b/src/lib/service/system/s6-svscan-log/run new file mode 100755 index 0000000..e8c4022 --- /dev/null +++ b/src/lib/service/system/s6-svscan-log/run @@ -0,0 +1,15 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +fdmove -c 1 2 + +if { mkdir -p -m750 -- @tmpfsdir@/@sysrundir@/log/uncaught-logs } +# fifo is created in prepare-svscan +if { chown -R @loguser@:@loguser@ @tmpfsdir@/@sysrundir@/log fifo } + +s6-setuidgid @loguser@ + +redirfd -rnb 0 fifo + +s6-log -bpd3 -- @logconfig@ @tmpfsdir@/@sysrundir@/log/uncaught-logs -- cgit v1.2.3