From c52a81288630c53b4bbefcb15bfd4e8868cc5163 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 9 Feb 2017 16:59:15 +0100 Subject: Add systemd user unit We use /bin/sh so we have an absolute path --- simplec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'simplec') 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 -- cgit v1.2.3