aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@iiso>2011-09-12 17:51:47 +0200
committertv <tv@iiso>2011-09-12 17:51:47 +0200
commit4bf7555ad325e4c44e08560c7109ae7e614dd9ee (patch)
treea0f94c1a8b21e17f36cc34cc6ff085819d95b738
parent1b1b674c708888840361cb6c617e7e55d7c36bee (diff)
//Reaktor/daemon: initial commit
-rw-r--r--README.md6
-rwxr-xr-xdaemon12
2 files changed, 15 insertions, 3 deletions
diff --git a/README.md b/README.md
index 05af8ef..a8f7d16 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,8 @@
## 3. marry Reaktor with /sbin/init
## 3a. /etc/inittab-like foo
- echo 10:2345:respawn:/bin/su Reaktor -c /krebs/Reaktor/index >>/etc/inittab
- # or 10:2345:respawn:/usr/bin/sudo -u Reaktor /krebs/Reaktor/index
+ echo 10:2345:respawn:/bin/su Reaktor -c /krebs/Reaktor/daemon >>/etc/inittab
+ # or 10:2345:respawn:/usr/bin/sudo -u Reaktor /krebs/Reaktor/daemon
# if Reaktor's shell is /bin/false or similar
# [check with e.g getent passwd Reaktor]
telinit q
@@ -24,6 +24,6 @@
author "The Ministerium"
stop on runlevel [016]
respawn
- exec /usr/bin/sudo -u Reaktor /krebs/Reaktor/index
+ exec /usr/bin/sudo -u Reaktor /krebs/Reaktor/daemon
EOF
start Reaktor
diff --git a/daemon b/daemon
new file mode 100755
index 0000000..ae2b49f
--- /dev/null
+++ b/daemon
@@ -0,0 +1,12 @@
+#! /bin/sh
+#
+# //Reaktor/daemon
+#
+# Start Reaktor as daemon w/o leaving an useless shell around.
+#
+set -euf
+
+# cd //Reaktor
+cd $(dirname $(readlink -f $0))
+
+./index &