Skip to content

Commit

Permalink
startstop.sh: reverse order from start to stop
Browse files Browse the repository at this point in the history
- now redis gets shut down latest
  • Loading branch information
wwwutz committed Jul 15, 2024
1 parent a9bf7fc commit d19fb02
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions startstop.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,18 @@ cmd="\${1:-help}"
srv="\${2:-all}"
if [[ \${srv} = 'all' ]]; then
srv_migrate
for srv in redis nginx gunicorn consumer scheduler worker; do
_srv=(redis nginx gunicorn consumer scheduler worker)
if [[ \${cmd} = 'start' ]]; then
srv_migrate
fi
# poor mans reverse
if [[ \${cmd} = 'stop' ]]; then
_srv=(\$(eval eval echo "'\"\\\${_srv['{\$((\${#_srv[@]}-1))..0}']}\"'"))
fi
for srv in \${_srv[@]}; do
echo "### ./startstop.sh \${cmd} \${srv}"
"${PROJECT}"/startstop.sh \${cmd} \${srv} || echo "RET: $?"
done
Expand Down

0 comments on commit d19fb02

Please sign in to comment.