X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fbtr;a=blobdiff_plain;f=bin%2Fbtrd.in;fp=bin%2Fbtrd.in;h=bcb1038003d6fec346a0b16d5c54674e01fddfea;hp=0000000000000000000000000000000000000000;hb=6a0d154a9ccfb0e2d2470dfdca06621e864895b3;hpb=c77cf9871e61151a16185d16abdaeb107279cd6a diff --git a/bin/btrd.in b/bin/btrd.in new file mode 100755 index 0000000..bcb1038 --- /dev/null +++ b/bin/btrd.in @@ -0,0 +1,26 @@ +#!/bin/bash + +export BTR_BINDIR=$(dirname $0)/ +export BTR_LIBDIR=$(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