mirror of
https://github.com/darksaid98/ubuntu-server-setup.git
synced 2026-12-01 22:22:31 +00:00
Added NTP configuration
This commit is contained in:
1 parent
a82bf4ff21
commit
f759b39cd0
3 files changed
+60
-2
No files matched your search
+19
-2
@@ -69,12 +69,27 @@ function testSwapSettings() {
|
||||
|
||||
tweakSwapSettings 10 50
|
||||
|
||||
assertEquals "$(cat /proc/sys/vm/swappiness)" "10"
|
||||
assertEquals "$(cat /proc/sys/vm/vfs_cache_pressure)" "50"
|
||||
assertEquals "10" "$(cat /proc/sys/vm/swappiness)"
|
||||
assertEquals "50" "$(cat /proc/sys/vm/vfs_cache_pressure)"
|
||||
|
||||
tweakSwapSettings "${swappiness}" "${cache_pressure}"
|
||||
}
|
||||
|
||||
function testTimezone() {
|
||||
local timezone="$(cat /etc/timezone)"
|
||||
|
||||
setTimezone "America/New_York"
|
||||
assertEquals "America/New_York" "$(cat /etc/timezone)"
|
||||
setTimezone "${timezone}"
|
||||
}
|
||||
|
||||
function testNTP() {
|
||||
local timedatectl="$(timedatectl status)"
|
||||
|
||||
configureNTP
|
||||
assertContains "NTP synchronized: yes" "${timedatectl}"
|
||||
}
|
||||
|
||||
function testTeardown () {
|
||||
echo "Test Teardown"
|
||||
|
||||
@@ -83,6 +98,8 @@ function testTeardown () {
|
||||
revertSSHConfig
|
||||
revertUfw
|
||||
deleteSwap
|
||||
|
||||
sudo apt-get --purge --assume-yes autoremove ntp
|
||||
}
|
||||
|
||||
### Helper Functions ###
|
||||
|
||||
Reference in new issue
Block a user