From ee8870fd7d49a3aba78f1f7399960307c58b194d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 26 Nov 2015 22:40:09 +0000 Subject: [PATCH] Check that the date is sane --- src/freedombone | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone b/src/freedombone index c76e4eba..606d0ced 100755 --- a/src/freedombone +++ b/src/freedombone @@ -11312,6 +11312,13 @@ function backup_github_projects { echo 'backup_github_projects' >> $COMPLETION_FILE } +function check_date { + curr_date=$(date) + if [[ $curr_date == *"1970"* ]]; then + apt-get -y install ntp + fi +} + function install_dynamicdns { if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then return @@ -11328,6 +11335,7 @@ function install_dynamicdns { git clone https://github.com/bashrc/inadyn $INSTALL_DIR/inadyn if [ ! -d $INSTALL_DIR/inadyn ]; then echo 'inadyn repo not cloned' + echo -n | openssl s_client -showcerts -connect github.com:443 -CApath /etc/ssl/certs exit 6785 fi cd $INSTALL_DIR/inadyn @@ -11756,6 +11764,7 @@ change_debian_repos enable_backports configure_dns initial_setup +check_date install_dynamicdns randomize_cron create_freedns_updater