summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xupdate_jdn.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index a861f113..abbced0e 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -26,7 +26,11 @@ explain() {
echo "$HOSTNAME: $1"
}
-
+set_correct_date() {
+ # set correct date
+ sudo service ntp stop || true
+ sudo ntpdate -b de.pool.ntp.org
+}
echo "--------------------------------------------"
explain "$(date) - begin deployment update."
@@ -35,13 +39,11 @@ explain "$(date) - begin deployment update."
case $HOSTNAME in
profitbricks-build4-amd64|profitbricks-build5-amd64|profitbricks-build6-i386|profitbricks-build15-amd64|profitbricks-build16-i386)
# set correct date
- sudo service ntp stop
- sudo ntpdate -b de.pool.ntp.org
+ set_correct_date
;;
codethink-sled9*|codethink-sled11*|codethink-sled13*|codethink-sled15*)
# set correct date
- sudo service ntp stop
- sudo ntpdate -b de.pool.ntp.org
+ set_correct_date
;;
*) ;;
esac