From 6afec834d195f71115369abf49854d84bd9734fa Mon Sep 17 00:00:00 2001 From: Simon Let Date: Wed, 18 Dec 2019 16:57:01 +0100 Subject: [PATCH] macos hotfix --- scripts/install.sh | 13 +++++++++++++ scripts/util.sh | 10 +++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c21a8d0..a95aa40 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -63,6 +63,19 @@ else fi fi +# if setsid --version >/dev/null 2>&1; then +# echo " * Setsid installed: OK" +# else +# echo " * Setsid installed: NOT INSTALLED!" +# # > Install using ... +# fi + +# if gnohup --version >/dev/null 2>&1; then +# echo " * Setsid installed: OK" +# else +# echo " * Setsid installed: NOT INSTALLED!" +# # > Install using ... +# fi # echo # echo "Continue with installation? (Any key to CONTINUE / Ctrl+C to ABORT)" diff --git a/scripts/util.sh b/scripts/util.sh index 3ac236a..14b5fb8 100644 --- a/scripts/util.sh +++ b/scripts/util.sh @@ -43,12 +43,12 @@ __resh_run_daemon() { if [ -n "${ZSH_VERSION-}" ]; then setopt LOCAL_OPTIONS NO_NOTIFY NO_MONITOR fi - # if [ "$(uname)" = Darwin ]; then - # # needs testing - # nohup script -q -c 'resh-daemon' ~/.resh/daemon_last_run_out.txt & - # else + if [ "$(uname)" = Darwin ]; then + # hotfix + gnohup resh-daemon > ~/.resh/daemon_last_run_out.txt 2>&1 & disown + else setsid resh-daemon > ~/.resh/daemon_last_run_out.txt 2>&1 & disown - #fi + fi } __resh_bash_completion_init() {