19 lines
383 B
Bash
Executable File
19 lines
383 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# 测试Nomad配置文件
|
|
CONFIG_FILE=$1
|
|
|
|
if [ -z "$CONFIG_FILE" ]; then
|
|
echo "请提供配置文件路径"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
echo "配置文件不存在: $CONFIG_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
echo "测试配置文件: $CONFIG_FILE"
|
|
|
|
# 尝试使用nomad agent命令测试配置
|
|
nomad agent -config="$CONFIG_FILE" -config-test 2>&1 | head -20 |