A bin folder, holding helpfull scripts and commands
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

mqtt_smarthome 391B

12345678910111213141516
  1. #!/bin/sh
  2. clear
  3. #!/bin/sh
  4. #
  5. for s in $(tmux list-sessions -F '#{session_name}'); do
  6. p=$(tmux list-panes -F '#{pane_tty}' -t "$s")
  7. if [ "$p" = "$(tty)" ]; then
  8. # Session already running
  9. exit 0
  10. fi
  11. done
  12. tmux attach-session -t mqtt_smarthome || tmux new-session -s mqtt_smarthome "/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py -f mqtt.home"