Patched pm-task start|stop|restart sub-commands.

This commit is contained in:
Ali
2026-04-09 17:18:52 +08:00
parent c62ffa8c1b
commit b01f625cb0
2 changed files with 28 additions and 34 deletions

View File

@@ -158,8 +158,7 @@ show_menu() {
# Function to restart containers
restart_containers() {
echo "Restarting containers in $WORKSPACE..."
cd "$WORKSPACE" || return 1
echo "Restarting containers..."
check_compose_file || return 1
@@ -177,8 +176,7 @@ restart_containers() {
# Function to start containers
start_containers() {
echo "Starting containers in $WORKSPACE..."
cd "$WORKSPACE" || return 1
echo "Starting containers..."
check_compose_file || return 1
@@ -189,8 +187,7 @@ start_containers() {
# Function to stop containers
stop_containers() {
echo "Stopping containers in $WORKSPACE..."
cd "$WORKSPACE" || return 1
echo "Stopping containers..."
check_compose_file || return 1
@@ -245,17 +242,17 @@ main() {
if [ "$task" = "--help" ]; then
echo "Usage: $0 [task]"
echo "Tasks:"
echo " (none) - Show menu and list container projects"
echo " restart - Restart container(s)"
echo " start/up - Start container(s)"
echo " stop/down - Stop container(s)"
echo " ps - Watch running containers"
echo " stats - Container statistics"
echo " logs/log - Follow container logs"
echo " sh/bash/shell - Exec into container bash shell"
echo " build/rebuild - Build containers and reload nginx"
echo " reload - Reload nginx service"
echo " upgrade - Pull latest images and upgrade containers"
echo " (none) - Show menu and list container projects"
echo " restart - Restart container(s)"
echo " start/up - Start container(s)"
echo " stop/down - Stop container(s)"
echo " ps - Watch running containers"
echo " stats - Container statistics"
echo " logs/log - Follow container logs"
echo " sh/bash/shell - Exec into container bash shell"
echo " build/rebuild - Build containers and reload nginx"
echo " reload - Reload nginx service"
echo " upgrade - Pull latest images and upgrade containers"
exit 0
fi