@@ -, +, @@ - apply bug 15303 - apply this patch - enable debian unstable repository - install package letsencrypt and dependencies - remove debian unstable repository - create koha instance koha-create --create-db --letsencrypt - follow test plan on bug 15303 where applicable --- debian/control.in | 3 ++- debian/docs/koha-create.xml | 11 +---------- debian/scripts/koha-create | 37 ++++++++++++++++++++++--------------- install_misc/debian.packages | 1 + 4 files changed, 26 insertions(+), 26 deletions(-) --- a/debian/control.in +++ a/debian/control.in @@ -35,7 +35,8 @@ Depends: ${misc:Depends}, ${koha:Depends}, xmlstarlet, yaz Suggests: mysql-server | virtual-mysql-server, - memcached + memcached, +letsencrypt Homepage: http://koha-community.org/ Description: integrated (physical) library management system Koha is an Integrated Library Management system for real-world libraries --- a/debian/docs/koha-create.xml +++ a/debian/docs/koha-create.xml @@ -40,7 +40,6 @@ port directory - directory | @@ -179,17 +178,9 @@ - - - Set up a https-only website - - - - - Specify the where letsencrypt-auto lives - It defaults to /usr/bin. + Set up a https-only website with letsencrypt cerificates --- a/debian/scripts/koha-create +++ a/debian/scripts/koha-create @@ -71,8 +71,7 @@ Options: conjunction with --defaultsql and --populate-db. --upload-path dir Set a user defined upload_path. It defaults to /var/lib/koha//uploads - --force-https Set up a https-only site with letsencrypt certificates - --letsencrypt Path to the letsencrypt folder + --letsencrypt Set up a https-only site with letsencrypt certificates --help,-h Show this help. Note: the instance name cannot be longer that 11 chars. @@ -195,11 +194,11 @@ EOM fi # Check that mod_ssl is installed and enabled. - if [ "$USE_HTTPS" = "yes" ]; then + if [ "$CLO_LETSENCRYPT" = "yes" ]; then if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'ssl_module'; then cat 1>&2 </dev/null | grep -c "ok installed") -eq 0 ]; + apt-cache show letsencrypt &>/dev/null + if [ $? -eq 0 ] + 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 + else + die "You have to install letsencrypt to use the --letsencrypt parameter." + fi + else + die "No installation candidate available for package letsencrypt." + fi fi if [ -f $PASSWDFILE ] && [ `cat $PASSWDFILE | grep "^$name:"` ] @@ -641,7 +648,7 @@ FLUSH PRIVILEGES; eof fi #` - if [ "$USE_HTTPS" = "yes" ]; then + if [ "$CLO_LETSENCRYPT" = "yes" ]; then APACHE_CONFIGFILE="apache-site-https.conf.in" else APACHE_CONFIGFILE="apache-site.conf.in" @@ -757,7 +764,7 @@ then koha-indexer --start "$name" fi - if [ "$USE_HTTPS" = "yes" ]; then + if [ "$CLO_LETSENCRYPT" = "yes" ]; then # Get letsencrypt certificates letsencrypt_instance fi --- a/install_misc/debian.packages +++ a/install_misc/debian.packages @@ -8,6 +8,7 @@ idzebra-2.0 install idzebra-2.0-common install idzebra-2.0-doc install idzebra-2.0-utils install +letsencrypt install libalgorithm-checkdigits-perl install libanyevent-http-perl install libanyevent-perl install --