X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fbtr;a=blobdiff_plain;f=bin%2Fbtrd;fp=bin%2Fbtrd;h=055bd7b479815e7164b431e71bb9e8e5e576c006;hp=0000000000000000000000000000000000000000;hb=36ab11ad208509a177f3976333d0728069e06ee8;hpb=3ea412c37b536f7f5f6b179c583f755ab70f1934 diff --git a/bin/btrd b/bin/btrd new file mode 100755 index 0000000..055bd7b --- /dev/null +++ b/bin/btrd @@ -0,0 +1,26 @@ +#!/bin/bash + +export BTR_BINDIR=$(realpath $(dirname $0)/) +export BTR_LIBDIR=$(realpath $(dirname $0)/../share/btr) +BTR_BANNER="Run btr as background daemon receiving jobs for a repo." + +. $BTR_LIBDIR/common.sh +. $BTR_LIBDIR/btr.sh + +btr-parseopts "$@" +btr-setup + +if $BTR_VERBOSE +then + btr-conf-show + btr-confirm "Everything setup. Do you want to start the daemon?" +elif ! $BTR_QUIET +then + echo "Starting the daemon. Control with \`btrc $BTR_BUILD\`" +else + echo "$BUILD" +fi + +setsid $SHELL -c "$BTR_LIBDIR/btrd.sh &" + +# vim: noet