2016-12-15 09:41:56 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Run resilio (bittorrent sync) from $HOME if it isn't running. Otherwise, open
|
|
|
|
# its gui in the browser.
|
|
|
|
|
|
|
|
open="open"
|
|
|
|
[[ $OSTYPE == linux* ]] && open="xdg-open"
|
2016-12-30 00:03:34 -08:00
|
|
|
|
|
|
|
if ! pgrep rslsync >/dev/null; then
|
2016-12-15 09:41:56 -08:00
|
|
|
pushd $HOME >/dev/null
|
|
|
|
rslsync &
|
|
|
|
popd >/dev/null
|
|
|
|
fi
|
2016-12-30 00:03:34 -08:00
|
|
|
|
|
|
|
[[ -t 0 ]] && $open http://localhost:8888/gui/
|