feat: implement first-pass at networking plugin
Implements help, `rebuild`, and `rebuildall` command. Refs #2403
This commit is contained in:
committed by
Michael Hobbs
parent
8be92d9739
commit
ec9b8be5f8
27
plugins/network/internal-functions
Executable file
27
plugins/network/internal-functions
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
network_help_content_func() {
|
||||
declare desc="return network plugin help content"
|
||||
cat<<help_content
|
||||
network:rebuild <app>, Rebuilds network settings for an app
|
||||
network:rebuildall, Rebuild network settings for all apps
|
||||
help_content
|
||||
}
|
||||
|
||||
network_help_cmd() {
|
||||
if [[ $1 = "network:help" ]] ; then
|
||||
echo -e 'Usage: dokku network[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Rebuilds network settings for an app.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
network_help_content_func | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
network_help_content_func
|
||||
else
|
||||
cat<<help_desc
|
||||
network, Manage network configuration for applications
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user