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"