Bug 15303 Followup: If install LE dependencies from backports on Jessie
authorMirko Tietgen <mirko@abunchofthings.net>
Mon, 18 Apr 2016 09:02:02 +0000 (11:02 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 13:04:32 +0000 (13:04 +0000)
On Debian Jessie, apt needs to be told it should get the dependencies
for the LE package from backports, or it will error. We check if we are
on Jessie and do that automatically so users don't need to set priorities
manually in apt.

Changed to lsb_release -c -s.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/scripts/koha-create

index 3ae762a..7fba8e6 100755 (executable)
@@ -338,7 +338,12 @@ check_letsencrypt()
         if [ $aptcacheshow -eq 0 ]; then
                 read -r -p "The letsencrypt package is not installed. Do it now?  [y/N] " response
                 if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
-                    apt-get install -y letsencrypt
+                    local debrelease="$(lsb_release -c -s)"
+                    if [ $debrelease = "jessie" ]; then
+                        apt-get install -y -t jessie-backports letsencrypt
+                    else
+                        apt-get install -y letsencrypt
+                    fi
                 else
                     die "You have to install letsencrypt to use the --letsencrypt parameter."
                 fi