Added help command for the manager script.
This commit is contained in:
@@ -85,7 +85,7 @@ set_up_middleware() {
|
|||||||
return 1 # Error
|
return 1 # Error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "Rebuild the Docker Container."
|
print_header "Rebuilt the Docker Container."
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -655,9 +655,28 @@ stop() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
help() {
|
||||||
print_header "Usage:
|
print_header "help:
|
||||||
>>> $0 {install|upgrade|rebuild|update_code|status|start|stop|show_config}"
|
|
||||||
|
Source Code Management:
|
||||||
|
install
|
||||||
|
update_code
|
||||||
|
upgrade
|
||||||
|
rebuild
|
||||||
|
|
||||||
|
App Running:
|
||||||
|
start
|
||||||
|
restart
|
||||||
|
status
|
||||||
|
stop
|
||||||
|
|
||||||
|
Configurations:
|
||||||
|
show_config
|
||||||
|
update_config
|
||||||
|
|
||||||
|
Help:
|
||||||
|
help
|
||||||
|
"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,7 +684,7 @@ usage() {
|
|||||||
main() {
|
main() {
|
||||||
# Check if an argument is provided
|
# Check if an argument is provided
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
usage
|
help
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! load_config; then
|
if ! load_config; then
|
||||||
@@ -676,15 +695,16 @@ main() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
install) install ;;
|
install) install ;;
|
||||||
update_code) update_code ;;
|
update_code) update_code ;;
|
||||||
rebuild) set_up_middleware;;
|
|
||||||
upgrade) upgrade ;;
|
upgrade) upgrade ;;
|
||||||
|
rebuild) set_up_middleware;;
|
||||||
start) start ;;
|
start) start ;;
|
||||||
restart) restart;;
|
restart) restart;;
|
||||||
status) status ;;
|
status) status ;;
|
||||||
|
stop) stop ;;
|
||||||
show_config) show_config ;;
|
show_config) show_config ;;
|
||||||
update_config) update_config;;
|
update_config) update_config;;
|
||||||
stop) stop ;;
|
help) help;;
|
||||||
*) echo "Invalid argument: $1"; usage ;;
|
*) echo "Invalid argument: $1"; help ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ ln -sf "$APP_DIR/scripts/manager.sh" "$HOME/.local/bin/db-middleware"
|
|||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
|
|
||||||
# sudo usermod -aG docker $USER
|
|
||||||
# newgrp docker
|
|
||||||
# Run the manager.sh script with the "install" argument
|
# Run the manager.sh script with the "install" argument
|
||||||
"$APP_DIR/scripts/manager.sh" install
|
"$APP_DIR/scripts/manager.sh" install
|
||||||
Reference in New Issue
Block a user