#!/bin/sh

service_prepare() {
  df | grep '/Volume[0-9]$' >/dev/null
  if [ $? -ne 0 ]; then
    echo "There is no disk mounted!"
    exit 255
  fi
  addomain=$(iniparse -c -f /etc/domain.config -s domain -k domain_name)
  ntpdate -u -b "$addomain"
}

STAT=$(iniparse -c -f /etc/domain.config -s domain -k connection_status)
if [ -n "$VAR" ] && [ $STAT -eq "0" ]; then
    exit 0
fi

service_prepare
exit 0
