Add ps:stopall command to stop all apps
This commit is contained in:
@@ -11,6 +11,7 @@ case "$1" in
|
|||||||
ps:scale <app> <proc>=<count> [<proc>=<count>...], Get/Set how many instances of a given process to run
|
ps:scale <app> <proc>=<count> [<proc>=<count>...], Get/Set how many instances of a given process to run
|
||||||
ps:start <app>, Start app container(s)
|
ps:start <app>, Start app container(s)
|
||||||
ps:stop <app>, Stop app container(s)
|
ps:stop <app>, Stop app container(s)
|
||||||
|
ps:stopall, Stop all app container(s)
|
||||||
ps:rebuild <app>, Rebuild an app from source
|
ps:rebuild <app>, Rebuild an app from source
|
||||||
ps:rebuildall, Rebuild all apps from source
|
ps:rebuildall, Rebuild all apps from source
|
||||||
ps:report [<app>] [<flag>], Displays a process report for one or more apps
|
ps:report [<app>] [<flag>], Displays a process report for one or more apps
|
||||||
|
|||||||
14
plugins/ps/subcommands/stopall
Executable file
14
plugins/ps/subcommands/stopall
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||||
|
|
||||||
|
ps_stopall_cmd() {
|
||||||
|
declare desc="stops all apps via command line"
|
||||||
|
local cmd="ps:stopall"
|
||||||
|
for app in $(dokku_apps); do
|
||||||
|
ps_stop "$app"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
ps_stopall_cmd "$@"
|
||||||
Reference in New Issue
Block a user