Created
August 22, 2022 10:22
-
-
Save hjst/52477eb2a34a12fbb364bfc81726ce07 to your computer and use it in GitHub Desktop.
Celery tmux session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SESSIONNAME="ctl" | |
tmux has-session -t $SESSIONNAME &> /dev/null | |
if [ $? != 0 ] | |
then | |
tmux new-session -s $SESSIONNAME -n dashboard -d sudo watch -n 5 podman ps -a | |
tmux split-window -v -l 70% top | |
tmux new-window -n flood-logs journalctl -u flood.service -f | |
tmux new-window -n clue-logs journalctl -u clue-api.service -f | |
tmux new-window -n znc-logs journalctl -u znc.service -f | |
tmux new-window -n podman-logs journalctl -u podman-auto-update.service -f | |
tmux new-window -n puzzle-logs journalctl --unit puzzle-fetcher.service --unit puzzle-server.service -f | |
tmux select-window -t ctl:dashboard | |
tmux select-pane -t ctl:dashboard.top # focus the sudo command so I can type my password | |
fi | |
tmux attach -t $SESSIONNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment