From 4f0db8bc9c93f0b87b9e7cd54e0307c5c6aab39e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 20 Nov 2018 16:57:44 -0700 Subject: [PATCH 1/5] continue when systemd --user fails --- usr/share/install_helper.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index e92f8ed..19655fd 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -493,16 +493,22 @@ elif [ "systemd" == "$my_system_launcher" ]; then else echo -n "." fi - systemctl --user daemon-reload - # enable also puts success output to stderr... why? - systemctl --user enable $my_app >/dev/null 2>/dev/null - #echo " > systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer" - #systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer - if [ -n "${TELEBIT_DEBUG}" ]; then - echo " > systemctl --user start $my_app" + set +e + if systemctl --user daemon-reload; then + # enable also puts success output to stderr... why? + systemctl --user enable $my_app >/dev/null 2>/dev/null + #echo " > systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer" + #systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer + if [ -n "${TELEBIT_DEBUG}" ]; then + echo " > systemctl --user start $my_app" + fi + systemctl --user stop $my_app >/dev/null 2>/dev/null + systemctl --user start $my_app >/dev/null + else + echo "libpam-systemd is missing, which is required on Linux to register Telebit with the user launcher." + echo "sudo apt-install -y libpam-systemd" + sudo apt-install -y libpam-systemd fi - systemctl --user stop $my_app >/dev/null 2>/dev/null - systemctl --user start $my_app >/dev/null sleep 2; # give it time to start _is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running") if [ -z "$_is_running" ]; then @@ -510,6 +516,7 @@ elif [ "systemd" == "$my_system_launcher" ]; then systemctl --user status --no-pager $my_app exit 1 fi + set -e echo -n "." else From 8bf4bfc7c08bd55c306e8fbe2151bc031af89b39 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 20 Nov 2018 16:59:32 -0700 Subject: [PATCH 2/5] typo fix apt-install -> apt-get install --- usr/share/install_helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index 19655fd..67bf653 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -506,8 +506,8 @@ elif [ "systemd" == "$my_system_launcher" ]; then systemctl --user start $my_app >/dev/null else echo "libpam-systemd is missing, which is required on Linux to register Telebit with the user launcher." - echo "sudo apt-install -y libpam-systemd" - sudo apt-install -y libpam-systemd + echo "sudo apt-get install -y libpam-systemd" + sudo apt-get install -y libpam-systemd fi sleep 2; # give it time to start _is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running") From 20321b2fbedc6611be087163c9e95fc80d8707d7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 20 Nov 2018 17:01:57 -0700 Subject: [PATCH 3/5] continue when systemd --user fails --- usr/share/install_helper.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index 67bf653..3c5a472 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -504,18 +504,18 @@ elif [ "systemd" == "$my_system_launcher" ]; then fi systemctl --user stop $my_app >/dev/null 2>/dev/null systemctl --user start $my_app >/dev/null + + sleep 2; # give it time to start + _is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running") + if [ -z "$_is_running" ]; then + echo "Something went wrong:" + systemctl --user status --no-pager $my_app + fi else echo "libpam-systemd is missing, which is required on Linux to register Telebit with the user launcher." echo "sudo apt-get install -y libpam-systemd" sudo apt-get install -y libpam-systemd fi - sleep 2; # give it time to start - _is_running=$(systemctl --user status --no-pager $my_app 2>/dev/null | grep "active.*running") - if [ -z "$_is_running" ]; then - echo "Something went wrong:" - systemctl --user status --no-pager $my_app - exit 1 - fi set -e echo -n "." else From 05dab9a52c6fbfcf002ae570eddc8469fc89dedb Mon Sep 17 00:00:00 2001 From: RubenVinke Date: Wed, 16 Jan 2019 23:03:09 +0000 Subject: [PATCH 4/5] 'README.md' updaten --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc10c3c..50e5764 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,8 @@ Windows & Node.js 1. Install [node.js](https://nodejs.org) 2. Open _Node.js_ 2. Run the command `npm install -g telebit` -2. Copy the example daemon conifg to your user folder `.config/telebit/telebitd.yml` (such as `/Users/John/.config/telebit/telebitd.yml`) -2. Copy the example remote conifg to your user folder `.config/telebit/telebit.yml` (such as `/Users/John/.config/telebit/telebit.yml`) +2. Copy the example daemon config to your user folder `.config/telebit/telebitd.yml` (such as `/Users/John/.config/telebit/telebitd.yml`) +2. Copy the example remote config to your user folder `.config/telebit/telebit.yml` (such as `/Users/John/.config/telebit/telebit.yml`) 2. Change the email address 2. Run `npx telebit init` and follow the instructions 2. Run `npx telebit list` From ceddf444b024ea2294334f761ff3360f12929c59 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 11 May 2019 18:22:20 -0600 Subject: [PATCH 5/5] update node version to v10.13 --- bin/telebit.js | 0 usr/share/install_helper.sh | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 bin/telebit.js diff --git a/bin/telebit.js b/bin/telebit.js old mode 100644 new mode 100755 diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index 3c5a472..8a8c2c6 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -133,8 +133,11 @@ my_tmp="$(mktemp -d -t telebit.XXXXXXXX)" #TELEBIT_TMP="$my_tmp/telebit" echo "Installing $my_name to '$TELEBIT_REAL_PATH'" -# v10.2+ has much needed networking fixes, but breaks ursa. v9.x has severe networking bugs. v8.x has working ursa, but requires tls workarounds" -NODEJS_VER="${NODEJS_VER:-v10.6}" +# v10.2+ has much needed networking fixes, but breaks ursa. +# v9.x has severe networking bugs. +# v8.x has working ursa, but requires tls workarounds" +# v10.13 seems to work for me locally (new greenlock) +NODEJS_VER="${NODEJS_VER:-v10.13}" export NODEJS_VER export NODE_PATH="$TELEBIT_TMP/lib/node_modules" export NPM_CONFIG_PREFIX="$TELEBIT_TMP"