mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: container name extraction in healthcheck function
Remove carriage return characters from container name extraction.
This commit is contained in:
+2
-2
@@ -42,7 +42,7 @@ function usage() {
|
||||
|
||||
function _healthcheck() {
|
||||
echo
|
||||
container_name=$(grep "container_name" $SQLBOT_RUNNING_BASE/docker-compose.yml | awk -F': ' '{print $2}')
|
||||
container_name=$(grep "container_name" "$SQLBOT_RUNNING_BASE/docker-compose.yml" | awk -F': ' '{print $2}' | tr -d '\r')
|
||||
sleep 1
|
||||
if [ -z '$(docker ps --filter "name=^$container_name$" -q)' ];then
|
||||
echo "未找到容器 $container_name。"
|
||||
@@ -203,4 +203,4 @@ function main() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
main
|
||||
main
|
||||
|
||||
Reference in New Issue
Block a user