diff options
Diffstat (limited to 'src/lib/service')
20 files changed, 123 insertions, 0 deletions
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 diff --git a/src/lib/service/user/.s6-svscan/SIGTERM b/src/lib/service/user/.s6-svscan/SIGTERM new file mode 100755 index 0000000..2098c8c --- /dev/null +++ b/src/lib/service/user/.s6-svscan/SIGTERM @@ -0,0 +1,5 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +user-shutdown diff --git a/src/lib/service/user/goetia-runner/notification-fd b/src/lib/service/user/goetia-runner/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/src/lib/service/user/goetia-runner/notification-fd @@ -0,0 +1 @@ +3 diff --git a/src/lib/service/user/goetia-runner/run b/src/lib/service/user/goetia-runner/run new file mode 100755 index 0000000..abbc6c0 --- /dev/null +++ b/src/lib/service/user/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 -d -t30000 -- diff --git a/src/lib/service/user/s6-svscan-log/notification-fd b/src/lib/service/user/s6-svscan-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/src/lib/service/user/s6-svscan-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/src/lib/service/user/s6-svscan-log/run b/src/lib/service/user/s6-svscan-log/run new file mode 100755 index 0000000..2c40369 --- /dev/null +++ b/src/lib/service/user/s6-svscan-log/run @@ -0,0 +1,17 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +fdmove -c 1 2 + +multisubstitute { + importas -Si USER + importas -Si HOME + importas -Si USERTREE +} + +if { mkdir -p -m 700 -- ${HOME}/@usrlogdir@/${USERTREE}/uncaught-logs } + +redirfd -rnb 0 fifo + +s6-log -bpd3 -- @logconfig@ ${HOME}/@usrlogdir@/${USERTREE}/uncaught-logs |
