summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/macosx/StartupItems/StartupParameters.plist11
-rwxr-xr-xetc/macosx/StartupItems/runit21
2 files changed, 32 insertions, 0 deletions
diff --git a/etc/macosx/StartupItems/StartupParameters.plist b/etc/macosx/StartupItems/StartupParameters.plist
new file mode 100644
index 0000000..14b5116
--- /dev/null
+++ b/etc/macosx/StartupItems/StartupParameters.plist
@@ -0,0 +1,11 @@
+{
+  Description     = "runit service supervision";
+  Provides        = ("runit");
+  Requires        = ("Disks");
+  OrderPreference = "None";
+  Messages =
+  {
+    start = "Starting runit service supervision";
+    stop  = "Stopping runit service supervision";
+  };
+}
diff --git a/etc/macosx/StartupItems/runit b/etc/macosx/StartupItems/runit
new file mode 100755
index 0000000..4a10bcc
--- /dev/null
+++ b/etc/macosx/StartupItems/runit
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+##
+# runit
+##
+
+. /etc/rc.common
+
+StartService() {
+  ConsoleMessage "Starting runit service supervision"
+  /bin/csh -cf '/etc/runit/2 &'
+}
+StopService() {
+  ConsoleMessage "Stopping runit service supervision"
+  svwaitdown -xk -t34 /service/*
+}
+RestartService() {
+  return 0
+}
+
+RunService "$1"