Просмотр исходного кода

Ensure ntpdate is available before install

Kristan Kenney 7 лет назад
Родитель
Сommit
626e24758a
2 измененных файлов с 14 добавлено и 0 удалено
  1. 7 0
      install/hst-install-debian.sh
  2. 7 0
      install/hst-install-ubuntu.sh

+ 7 - 0
install/hst-install-debian.sh

@@ -281,6 +281,13 @@ apt-get -qq update
 # Creating backup directory
 mkdir -p $hst_backups
 
+# Checking ntpdate
+if [ ! -e '/usr/sbin/ntpdate' ]; then
+    echo "Install missing ntpdate..."
+    apt-get -y install ntpdate >> $LOG
+    check_result $? "Can't install ntpdate"
+fi
+
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     echo "Install missing wget..."

+ 7 - 0
install/hst-install-ubuntu.sh

@@ -266,6 +266,13 @@ apt-get -qq update
 # Creating backup directory
 mkdir -p $hst_backups
 
+# Checking ntpdate
+if [ ! -e '/usr/sbin/ntpdate' ]; then
+    echo "Install missing ntpdate..."
+    apt-get -y install ntpdate >> $LOG
+    check_result $? "Can't install ntpdate"
+fi
+
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     echo "Install missing wget..."