change cd in tmux node_exporter

This commit is contained in:
Valentin 2024-06-07 15:08:42 +02:00
parent a1666d9254
commit 9c5a24f4b6
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
./setup_ssh_keys.sh . bin/setup_ssh_keys.sh
install_pkg cron install_pkg cron

View File

@ -13,7 +13,7 @@ if [[ -n "$RECEIVING_IP" && -n "$RECEIVING_USER" && -n "$RECEIVING_PORT" ]]; the
install_pkg tmux install_pkg tmux
tmux new-session -d -s node-exporter tmux new-session -d -s node-exporter
tmux send-keys -t node-exporter "cd node_exporter-*.*-amd64 && ./node_exporter" C-m tmux send-keys -t node-exporter "cd /root/node_exporter-*.*-amd64 && ./node_exporter" C-m
get_ip get_ip
# si l'url est pas set set l'url # si l'url est pas set set l'url

View File

@ -7,5 +7,6 @@ read RECEIVING_USER
echo -e "${PURPLE}${BOLD}Enter the receiving server port : ${RESET}" echo -e "${PURPLE}${BOLD}Enter the receiving server port : ${RESET}"
read RECEIVING_PORT read RECEIVING_PORT
# si les ssh keys sont pas déjà set
ssh-keygen ssh-keygen
ssh-copy-id -p ${RECEIVING_PORT} ${RECEIVING_USER}@${RECEIVING_IP} ssh-copy-id -p ${RECEIVING_PORT} ${RECEIVING_USER}@${RECEIVING_IP}