From db5ec5cf33847a88b23bb33bb6e92d1bc12f3f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 16 Feb 2022 08:55:13 +0100 Subject: [PATCH] feat: explain how to start PostgreSQL (#4909) --- .../SoftwareReport/SoftwareReport.Databases.psm1 | 15 +++++++++++++++ .../SoftwareReport/SoftwareReport.Generator.ps1 | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 index 5cdfddc2..6966527f 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -33,6 +33,21 @@ function Get-SqlPackageVersion { return "SqlPackage $sqlPackageVersion" } +function Build-PostgreSqlSection { + $output = "" + + $output += New-MDHeader "PostgreSQL" -Level 4 + $output += New-MDList -Style Unordered -Lines @( + (Get-PostgreSqlVersion ), + "PostgreSQL Server (user:postgres)" + ) + $output += New-MDCode -Lines @( + "PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'" + ) + + return $output +} + function Build-MySQLSection { $output = "" diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 3fac0b71..d824002e 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -236,12 +236,12 @@ $markdown += New-MDList -Lines $tools -Style Unordered $markdown += New-MDHeader "Databases" -Level 3 $markdown += New-MDList -Style Unordered -Lines (@( - (Get-PostgreSqlVersion), (Get-MongoDbVersion), (Get-SqliteVersion) ) | Sort-Object ) +$markdown += Build-PostgreSqlSection $markdown += Build-MySQLSection $markdown += Build-MSSQLToolsSection