fixes absolute path for install

This commit is contained in:
waldek 2022-01-17 11:57:58 +01:00
parent 7dc957c4cd
commit 38d562697d
1 changed files with 3 additions and 2 deletions

View File

@ -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"