Skip to content

Instantly share code, notes, and snippets.

@hjst
Created August 22, 2022 10:22
Show Gist options
  • Save hjst/52477eb2a34a12fbb364bfc81726ce07 to your computer and use it in GitHub Desktop.
Save hjst/52477eb2a34a12fbb364bfc81726ce07 to your computer and use it in GitHub Desktop.
Celery tmux session
#!/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