os/arch/bin/rsl: fix url + open url if interactive

This commit is contained in:
Henrik Lissner 2016-12-30 03:03:34 -05:00
parent 9de616108f
commit 30f8029c23

View file

@ -5,10 +5,11 @@
open="open"
[[ $OSTYPE == linux* ]] && open="xdg-open"
if pgrep rslsync >/dev/null; then
$open http://locahost:8888
else
if ! pgrep rslsync >/dev/null; then
pushd $HOME >/dev/null
rslsync &
popd >/dev/null
fi
[[ -t 0 ]] && $open http://localhost:8888/gui/