Add support for 22.04 (#16)

* Add Vagrantfile for Jammy

* Fix configuration of NTP for Jammy

* Update setup text to be more accurate

* Update README
This commit is contained in:
Jason Hee authored and GitHub committed 2022-04-18 04:57:03 +08:00
1 parent 7beaeed0cd
commit 6fc75796a3
5 files changed
+10 -4

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ cat ~/.ssh/user_server_ed25519.pub
Finally, you will be prompted to specify a [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the server. It will be set to 'Asia/Singapore' if you do not specify a value. Finally, you will be prompted to specify a [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the server. It will be set to 'Asia/Singapore' if you do not specify a value.
# Supported versions # Supported versions
This setup script has been tested against Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04 and Ubuntu 20.04. This setup script has been tested against Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04.
# Running tests # Running tests
Tests are run against a set of Vagrant VMs. To run the tests, run the following in the project's directory: Tests are run against a set of Vagrant VMs. To run the tests, run the following in the project's directory:
+1 -1
View File
@@ -52,7 +52,7 @@ function main() {
setupTimezone setupTimezone
echo "Installing Network Time Protocol... " >&3 echo "Configuring System Time... " >&3
configureNTP configureNTP
sudo service ssh restart sudo service ssh restart
+1 -1
View File
@@ -125,7 +125,7 @@ function setTimezone() {
function configureNTP() { function configureNTP() {
ubuntu_version="$(lsb_release -sr)" ubuntu_version="$(lsb_release -sr)"
if [[ $ubuntu_version == '20.04' ]]; then if [[ $(bc -l <<< "${ubuntu_version} >= 20.04") -eq 1 ]]; then
sudo systemctl restart systemd-timesyncd sudo systemctl restart systemd-timesyncd
else else
sudo apt-get update sudo apt-get update
+6
View File
@@ -0,0 +1,6 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/jammy64"
end
+1 -1
View File
@@ -116,7 +116,7 @@ function testNTP() {
configureNTP configureNTP
ubuntu_version="$(lsb_release -sr)" ubuntu_version="$(lsb_release -sr)"
if [[ $ubuntu_version == '18.04' || $ubuntu_version == '20.04' ]]; then if [[ $(bc -l <<< "${ubuntu_version} >= 18.04") -eq 1 ]]; then
sleep 2 sleep 2
assertContains "System clock synchronized: yes" "$(timedatectl status)" assertContains "System clock synchronized: yes" "$(timedatectl status)"
else else