Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Uses Tnux to display gravity entries and Chronometer for two PiHholes
- # Most useful in a full-screen TTY console, e.g. <Ctrl-Alt-F2>
- # Requires tmux and access to two Pi via ssh keys
- # chmod +x yourfilename to make executable
- SESSION=$USER
- tmux new-session -d -s $SESSION
- # Setup a window for monitoring pi & dietpi
- tmux new-window -t $SESSION -n 'Pi'
- # Split window into 4 panes
- tmux split-window -v
- tmux resize-pane -D 10
- tmux split-window -h
- tmux select-pane -t 0
- tmux split-window -h
- tmux send-keys -t {top-left} "ssh stephen@10.0.0.7" C-m "pihole -t | grep -B 1 gravity" C-m
- tmux send-keys -t {bottom-left} "ssh stephen@10.0.0.7" C-m "pihole -c" C-m
- tmux send-keys -t {top-right} "ssh stephen@10.0.0.8" C-m "pihole -t | grep -B 1 gravity" C-m
- tmux send-keys -t {bottom-right} "ssh stephen@10.0.0.8" C-m "pihole -c" C-m
- tmux select-window -t $SESSION:1
- # Attach to session - works best in a TTY console
- tmux a -t $SESSION # or $USER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement