From 3fc44dee2b3aa9ccc4356612acf54586043c068d Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 6 Feb 2018 16:59:00 +0100 Subject: [PATCH] Configure busybox NTP client instead of sntpc --- basic.sh | 6 +++++- basic/etc/conf.d/ntpd | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 basic/etc/conf.d/ntpd diff --git a/basic.sh b/basic.sh index 73c60de..a61318f 100755 --- a/basic.sh +++ b/basic.sh @@ -3,7 +3,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/basic # Install packages -apk --no-cache add --virtual .useful curl git file htop libressl openssh-server openssh-sftp-server sntpc +apk --no-cache add --virtual .useful curl git file htop libressl openssh-server openssh-sftp-server apk --no-cache add docker gettext kbd-misc python2 nginx # Copy profile files and settings @@ -27,6 +27,10 @@ cp ${SOURCE_DIR}/etc/issue.template /etc/issue.template cp ${SOURCE_DIR}/sbin/issue-gen /sbin/issue-gen >/etc/motd +# Configure NTP client +cp ${SOURCE_DIR}/etc/conf.d/ntpd /etc/conf.d/ntpd +rc-update add ntpd boot + # Create a self-signed certificate mkdir /etc/ssl/private openssl req -x509 -new -out /etc/ssl/certs/services.pem -keyout /etc/ssl/private/services.key -nodes -days 3654 -subj "/C=CZ/CN=$(hostname -f)" diff --git a/basic/etc/conf.d/ntpd b/basic/etc/conf.d/ntpd new file mode 100644 index 0000000..91c628c --- /dev/null +++ b/basic/etc/conf.d/ntpd @@ -0,0 +1 @@ +NTPD_OPTS="-N -p tik.cesnet.cz -p tak.cesnet.cz"