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