diff options
author | tv <tv@iiso> | 2011-09-12 17:51:47 +0200 |
---|---|---|
committer | tv <tv@iiso> | 2011-09-12 17:51:47 +0200 |
commit | b1519a3ddf17455639189ffb79cb51ddce60e45b (patch) | |
tree | 1c55f64cdd31ff5cef81d67007617b71a8612aaa /Reaktor | |
parent | 95828a2628547fdc7a2d35dc898de4a9a56eece0 (diff) |
//Reaktor/daemon: initial commit
Diffstat (limited to 'Reaktor')
-rw-r--r-- | Reaktor/README.md | 6 | ||||
-rwxr-xr-x | Reaktor/daemon | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Reaktor/README.md b/Reaktor/README.md index 05af8ef5..a8f7d160 100644 --- a/Reaktor/README.md +++ b/Reaktor/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/Reaktor/daemon b/Reaktor/daemon new file mode 100755 index 00000000..ae2b49f9 --- /dev/null +++ b/Reaktor/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 & |