Compare commits
No commits in common. "93778d03af31a5d1ae06ac67661d9fc96fdcc828" and "a7b30a4bf10ce4aeed9aece902d0b82251b47966" have entirely different histories.
93778d03af
...
a7b30a4bf1
@ -31,25 +31,28 @@ dockerComposeDown()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$OS_TYPE" == "Ubuntu" || "$OS_TYPE" == "Debian" ]]; then
|
if [[ "$OS_TYPE" == "Ubuntu" || "$OS_TYPE" == "Debian" ]]; then
|
||||||
if [ ! -f "$containers_dir$app_name/$compose_file" ]; then
|
if [ -f "$containers_dir$app_name/$compose_file" ]; then
|
||||||
isNotice "Unable to find the compose file to docker compose down this application."
|
# Used for the standard LibrePortal app
|
||||||
return 1
|
if [[ "$type" == "" ]]; then
|
||||||
fi
|
if [[ $CFG_DOCKER_INSTALL_TYPE == "rootless" ]]; then
|
||||||
|
local result=$(dockerCommandRunInstallUser "cd $containers_dir$app_name && docker compose $setup_compose down" >/dev/null 2>&1)
|
||||||
# Explicit type arg (CLI dockertype switcher) wins, otherwise the
|
checkSuccess "Shutting down container for $app_name"
|
||||||
# configured install type. Every branch ends in a status line so the
|
elif [[ $CFG_DOCKER_INSTALL_TYPE == "rooted" ]]; then
|
||||||
# header is never left without output.
|
local result=$(cd "$containers_dir$app_name" && sudo docker compose $setup_compose down >/dev/null 2>&1)
|
||||||
local mode="${type:-$CFG_DOCKER_INSTALL_TYPE}"
|
checkSuccess "Shutting down container for $app_name"
|
||||||
if [[ $mode == "rootless" ]]; then
|
fi
|
||||||
local result=$(dockerCommandRunInstallUser "cd $containers_dir$app_name && docker compose $setup_compose down" >/dev/null 2>&1)
|
# Used for the CLI dockertype switcher.
|
||||||
checkSuccess "Shutting down container for $app_name"
|
else
|
||||||
elif [[ $mode == "rooted" ]]; then
|
if [[ $type == "rootless" ]]; then
|
||||||
local result=$(cd "$containers_dir$app_name" && sudo docker compose $setup_compose down >/dev/null 2>&1)
|
local result=$(dockerCommandRunInstallUser "cd $containers_dir$app_name && docker compose $setup_compose down" >/dev/null 2>&1)
|
||||||
checkSuccess "Shutting down container for $app_name"
|
checkSuccess "Shutting down container for $app_name"
|
||||||
|
elif [[ $type == "rooted" ]]; then
|
||||||
|
local result=$(cd "$containers_dir$app_name" && sudo docker compose $setup_compose down >/dev/null 2>&1)
|
||||||
|
checkSuccess "Shutting down container for $app_name"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
isNotice "Unknown Docker install type '$mode' — cannot shut down $app_name."
|
isNotice "Unable to find the compose file to docker compose down this application."
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
isNotice "Unsupported OS '$OS_TYPE' — cannot shut down $app_name."
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user