summaryrefslogtreecommitdiff
path: root/simplec
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-09 16:59:15 +0100
committerGuido Günther <agx@sigxcpu.org>2017-02-09 17:15:40 +0100
commitc52a81288630c53b4bbefcb15bfd4e8868cc5163 (patch)
treef220df3484c5a8dedaa0195523bda4bacdca66a8 /simplec
parent48ca448bfca0c23ba44c3a8137610f81d546ae61 (diff)
Add systemd user unitHEADmaster
We use /bin/sh so we have an absolute path
Diffstat (limited to 'simplec')
-rwxr-xr-xsimplec10
1 files changed, 8 insertions, 2 deletions
diff --git a/simplec b/simplec
index ca544e8..d2d5480 100755
--- a/simplec
+++ b/simplec
@@ -1,3 +1,9 @@
#!/bin/sh
-`dirname $0`
-exec erl -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -s simplec
+BIN=$(realpath $0)
+cd $(dirname $BIN)
+
+if [ ! -t 1 ]; then
+ ARGS=-noinput
+fi
+
+exec erl $ARGS -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -s simplec