From 6b7bc1a6ec873d83f640e3755074b23d90801a39 Mon Sep 17 00:00:00 2001 From: casperklein Date: Sun, 23 May 2021 02:36:30 +0200 Subject: [PATCH] interact with supervisorctl --- mailctl | 8 +++++++- mailctl-completion.bash | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mailctl b/mailctl index e9ea4a3..1dfd7cd 100755 --- a/mailctl +++ b/mailctl @@ -8,7 +8,7 @@ TIMEOUT=3600 # a lot of time for a graceful container stop # -------------------------------------------------------------------- -VER=0.13.0 +VER=0.14.0 set -ueo pipefail @@ -177,6 +177,11 @@ case "${1:-}" in docker exec -it "$CONTAINER" bash ;; + super*) # Interact with supervisorctl + shift + docker exec -it "$CONTAINER" supervisorctl "$@" + ;; + update-c*) # Check for container package updates docker exec -it "$CONTAINER" bash -c 'apt update && echo && apt list --upgradable' ;; @@ -215,6 +220,7 @@ case "${1:-}" in $APP postconf Show postfix configuration $APP logs [-f] Show logs. Use -f to 'follow' the logs $APP login Run container shell + $APP supervisor Interact with supervisorctl $APP update-check Check for container package updates $APP update-packages Update container packages $APP versions Show package versions diff --git a/mailctl-completion.bash b/mailctl-completion.bash index 04146f9..35c6b0d 100644 --- a/mailctl-completion.bash +++ b/mailctl-completion.bash @@ -2,7 +2,7 @@ _mailctl() { local cur prev options cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - options="status start stop restart setup queue flush view delete fail2ban ports postconf logs login update-check update-packages versions" + options="status start stop restart setup queue flush view delete fail2ban ports postconf logs login supervisor update-check update-packages versions" if [ $COMP_CWORD -eq 1 ]; then COMPREPLY=( $(compgen -W "${options[@]}" -- $cur) ) elif [ $COMP_CWORD -eq 2 ]; then