update date and time

This commit is contained in:
Gilles Mouchet 2024-05-21 23:57:46 +02:00
parent 006305ab4f
commit e4c2b4f26b

View File

@ -127,4 +127,28 @@ printSuccess "Ansible installed successfully"
printInfo "Add ./.local/bin in path" printInfo "Add ./.local/bin in path"
echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc
if [ $? -ne 0 ]; then printError "Problem to install ansible";exit; fi if [ $? -ne 0 ]; then printError "Problem to install ansible";exit; fi
printSuccess "./.local/bin added in path successfully " printSuccess "./.local/bin added in path successfully "
#-----------------------------------------------------------------------------
# update date and time
#-----------------------------------------------------------------------------
printInfo "Update date and time"
chronyc -a makestep
if [ $? -ne 0 ]; then printError "Problem to update date and time";exit; fi
printSuccess "Date and Time updated successfully"
#-----------------------------------------------------------------------------
# set timezone
#-----------------------------------------------------------------------------
#printInfo "Set timzone"
#timedatectl set-timezone Europe/Zurich
#if [ $? -ne 0 ]; then printError "Problem to set timezone";exit; fi
#printSuccess "Timezone setted successfully"
#-----------------------------------------------------------------------------
# set locale
#-----------------------------------------------------------------------------
#printInfo "Set timzone"
#timedatectl set-timezone Europe/Zurich
#if [ $? -ne 0 ]; then printError "Problem to set timezone";exit; fi
#printSuccess "Timezone setted successfully"