Commit 69f14068 authored by Jeff Bilyk's avatar Jeff Bilyk

setup-ntpd: renamed from setup-chrony, add support for openntpd, other cleanups

parent 50a00f2f
......@@ -15,7 +15,7 @@ SBIN_FILES := lbu\
setup-alpine-web\
setup-apklbu\
setup-apkrepos\
setup-chrony\
setup-ntp\
setup-cryptswap\
setup-disk\
setup-dns\
......
......@@ -78,6 +78,6 @@ DEFAULT_DISK=none \
$PREFIX/sbin/setup-apklbu -i
$PREFIX/sbin/setup-chrony
$PREFIX/sbin/setup-ntp
$PREFIX/sbin/setup-sshd
#!/bin/sh
PREFIX=
. "$PREFIX/lib/libalpine.sh"
usage() {
cat <<__EOF__
usage: setup-chrony [-hn]
Setup chrony for NTP time synchronization
options:
-h Show this help
-n Don't prompt, just use defaults
__EOF__
exit 1
}
while getopts "hn" opt; do
case $opt in
n) PROMPT="0";;
h) usage;;
esac
done
if [ "$PROMPT" != "0" ]; then
echo "Setup chrony for NTP? (y/N)"
default_read setupchrony "N"
if [ "$setupchrony" = "N" ] || [ "$setupchrony" = "n" ]; then
exit 0
fi
fi
exit 1
acfinstalled="`apk version acf-core -q | awk '{print $1}'`"
if [ "$acfinstalled" != "ERROR:" ]; then
apk add acf-chrony -q
else
apk add chrony -q
fi
echo "10 cronpass" > /etc/chrony/chrony.keys
/etc/init.d/chronyd start
rc-update add chronyd default
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment