[PATCH v5 compass-ci 3/5] container/ntp-server: start-server.sh

[What] start ntp-server and specify the log file. Signed-off-by: Wang Chenglong <18509160991@163.com> --- container/ntp-server/start-server.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 container/ntp-server/start-server.sh diff --git a/container/ntp-server/start-server.sh b/container/ntp-server/start-server.sh new file mode 100755 index 0000000..bf87bd5 --- /dev/null +++ b/container/ntp-server/start-server.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +/usr/sbin/ntpd -g -l /var/log/ntpstats/ntpd.log + +exec "$@" -- 2.23.0

diff --git a/container/ntp-server/start-server.sh b/container/ntp-server/start-server.sh new file mode 100755 index 0000000..bf87bd5 --- /dev/null +++ b/container/ntp-server/start-server.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +/usr/sbin/ntpd -g -l /var/log/ntpstats/ntpd.log + +exec "$@"
why add this file, if want execute shell command in ntp-server, can write in Dockerfile, use like this CMD ./start-server.sh Thanks, Yinsi

+# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +/usr/sbin/ntpd -g -l /var/log/ntpstats/ntpd.log + +exec "$@"
why add this file, if want execute shell command in ntp-server, can write in Dockerfile, use like this
CMD ./start-server.sh
CMD [ "ntpd -g -l /var/log/ntpstats/ntpd/log" ] is ok?
Thanks, Yinsi

On Thu, Oct 29, 2020 at 06:04:43PM +0800, Liu Yinsi wrote:
+# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +/usr/sbin/ntpd -g -l /var/log/ntpstats/ntpd.log + +exec "$@"
why add this file, if want execute shell command in ntp-server, can write in Dockerfile, use like this
CMD ./start-server.sh
CMD [ "ntpd -g -l /var/log/ntpstats/ntpd/log" ] is ok?
I have tried. But i think this way is better and easier.
Thanks, Yinsi
participants (2)
-
Liu Yinsi
-
Wang Chenglong