diff --git a/scripts/manager.sh b/scripts/manager.sh index 8035af5..8cf13c4 100755 --- a/scripts/manager.sh +++ b/scripts/manager.sh @@ -85,7 +85,7 @@ set_up_middleware() { return 1 # Error fi - print_header "Rebuild the Docker Container." + print_header "Rebuilt the Docker Container." return 0 } @@ -655,9 +655,28 @@ stop() { fi } -usage() { - print_header "Usage: - >>> $0 {install|upgrade|rebuild|update_code|status|start|stop|show_config}" +help() { + print_header "help: + +Source Code Management: + install + update_code + upgrade + rebuild + +App Running: + start + restart + status + stop + +Configurations: + show_config + update_config + +Help: + help +" exit 1 } @@ -665,7 +684,7 @@ usage() { main() { # Check if an argument is provided if [[ $# -eq 0 ]]; then - usage + help fi if ! load_config; then @@ -676,15 +695,16 @@ main() { case "$1" in install) install ;; update_code) update_code ;; - rebuild) set_up_middleware;; upgrade) upgrade ;; + rebuild) set_up_middleware;; start) start ;; restart) restart;; status) status ;; + stop) stop ;; show_config) show_config ;; update_config) update_config;; - stop) stop ;; - *) echo "Invalid argument: $1"; usage ;; + help) help;; + *) echo "Invalid argument: $1"; help ;; esac } diff --git a/scripts/setup.sh b/scripts/setup.sh index 4584eb9..f11a542 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -54,7 +54,6 @@ ln -sf "$APP_DIR/scripts/manager.sh" "$HOME/.local/bin/db-middleware" export PATH="$HOME/.local/bin:$PATH" source ~/.bashrc -# sudo usermod -aG docker $USER -# newgrp docker + # Run the manager.sh script with the "install" argument -"$APP_DIR/scripts/manager.sh" install \ No newline at end of file +"$APP_DIR/scripts/manager.sh" install