From 38d562697dac65e61fc844ab54b8593cd974d564 Mon Sep 17 00:00:00 2001 From: waldek Date: Mon, 17 Jan 2022 11:57:58 +0100 Subject: [PATCH] fixes absolute path for install --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index cb20607..4f3c367 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,7 @@ if [ "$EUID" -ne 0 ] exit 1 fi +SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)/" VIEWER="tmuxviewer" SSHD_CONFIG_FOLDER="/etc/ssh/sshd_config.d/" CONFIG_FILE="$VIEWER.config" @@ -15,8 +16,8 @@ BROADCAST_BIN="tmux_broadcast.sh" function install_tmuxviewer () { echo "adding $VIEWER_BIN and $BROADCAST_BIN to $BIN_FOLDER" - sudo cp $VIEWER_BIN $BIN_FOLDER$VIEWER_BIN - sudo cp $BROADCAST_BIN $BIN_FOLDER$BROADCAST_BIN + sudo cp $SCRIPT_DIR$VIEWER_BIN $BIN_FOLDER$VIEWER_BIN + sudo cp $SCRIPT_DIR$BROADCAST_BIN $BIN_FOLDER$BROADCAST_BIN echo "adding user $VIEWER" sudo useradd --home /tmp/$VIEWER --shell /usr/bin/tmux_viewer.sh $VIEWER echo "unsetting password for $VIEWER"