fix: 更新数据库配置设置
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
@@ -12,15 +11,17 @@ set -o pipefail
|
||||
|
||||
# We add the copy from default config in the entrypoint to not break users
|
||||
# case someone mounts a configuration file in /usr/local/etc/omc/default)
|
||||
cp -nr "$BASE_DIR"/default/. "$BASE_DIR"
|
||||
cp -n $BASE_DIR/default/omc.conf $BASE_DIR/omc.conf
|
||||
cp -n $BASE_DIR/default/omc.yaml $BASE_DIR/omc.yaml
|
||||
# cp -n $BASE_DIR/default/sshsvc.yaml $BASE_DIR/sshsvc.yaml
|
||||
|
||||
# Initialize OMC DB
|
||||
if [ ! -f /usr/local/etc/omc/machine.ini ]; then
|
||||
bash /usr/local/etc/omc/script/setup.sh -i -r -m $M_PARAM -c $C_PARAM
|
||||
fi
|
||||
|
||||
# Start Nginx server
|
||||
nginx -g "daemon off;"
|
||||
# Start Nginx server | -s stop
|
||||
nginx
|
||||
|
||||
# Parse CLI flags to pass to the 'omc' call
|
||||
args=("--config" "${BASE_DIR}/omc.yaml")
|
||||
@@ -30,5 +31,5 @@ read -r -a extra_flags <<< "$CMD_EXTRA_FLAGS"
|
||||
# Add flags passed to this script
|
||||
args+=("$@")
|
||||
|
||||
omc --version
|
||||
exec omc "${args[@]}"
|
||||
# Run omc
|
||||
omc "${args[@]}"
|
||||
|
||||
Reference in New Issue
Block a user