From 30f8029c23175e05f845be33925b4655d6d78b2a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Dec 2016 03:03:34 -0500 Subject: [PATCH] os/arch/bin/rsl: fix url + open url if interactive --- os/arch/bin/rsl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/os/arch/bin/rsl b/os/arch/bin/rsl index 78b6eae6..881609c7 100755 --- a/os/arch/bin/rsl +++ b/os/arch/bin/rsl @@ -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/