Skip to content

Commit

Permalink
interact with supervisorctl
Browse files Browse the repository at this point in the history
  • Loading branch information
casperklein committed May 23, 2021
1 parent 92c1c81 commit 6b7bc1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion mailctl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'
;;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mailctl-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b7bc1a

Please sign in to comment.