Check that the date is sane

This commit is contained in:
Bob Mottram 2015-11-26 22:40:09 +00:00
parent ff3c8204a7
commit ee8870fd7d
1 changed files with 9 additions and 0 deletions

View File

@ -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