OSX compatibility
[m6w6/btr] / bin / btrd.in
1 #!/bin/bash
2
3 export BTR_BINDIR=$(dirname $0)/
4 export BTR_LIBDIR=$(dirname $0)/../share/btr
5 BTR_BANNER="Run btr as background daemon receiving jobs for a repo."
6
7 . $BTR_LIBDIR/common.sh
8 . $BTR_LIBDIR/btr.sh
9
10 btr_parseopts "$@"
11 btr_setup
12
13 if $BTR_VERBOSE
14 then
15 btr_conf_show
16 btr_confirm "Everything setup. Do you want to start the daemon?"
17 elif ! $BTR_QUIET
18 then
19 echo "Starting the daemon. Control with \`btrc $BTR_BUILD\`"
20 else
21 echo "$BUILD"
22 fi
23
24 @SETSID@ $SHELL -c "$BTR_LIBDIR/btrd.sh &"
25
26 # vim: noet