View | Details | Raw Unified | Return to bug 15303
Collapse All | Expand All

(-)a/debian/scripts/koha-create (-1 / +16 lines)
Lines 71-76 Options: Link Here
71
                            conjunction with --defaultsql and --populate-db.
71
                            conjunction with --defaultsql and --populate-db.
72
  --upload-path dir         Set a user defined upload_path. It defaults to
72
  --upload-path dir         Set a user defined upload_path. It defaults to
73
                            /var/lib/koha/<instance>/uploads
73
                            /var/lib/koha/<instance>/uploads
74
  --force-https             Set up a https-only site with letsencrypt certificates
74
  --help,-h                 Show this help.
75
  --help,-h                 Show this help.
75
76
76
Note: the instance name cannot be longer that 11 chars.
77
Note: the instance name cannot be longer that 11 chars.
Lines 419-424 while true ; do Link Here
419
            SRU_SERVER_PORT="$2" ; shift 2 ;;
420
            SRU_SERVER_PORT="$2" ; shift 2 ;;
420
        --upload-path)
421
        --upload-path)
421
            CLO_UPLOAD_PATH="$2" ; shift 2 ;;
422
            CLO_UPLOAD_PATH="$2" ; shift 2 ;;
423
        --force-https)
424
            USE_HTTPS="yes" ; shift ;;
422
        -h|--help)
425
        -h|--help)
423
            usage ; exit 0 ;;
426
            usage ; exit 0 ;;
424
        --)
427
        --)
Lines 708-713 then Link Here
708
        # Start Indexer daemon
711
        # Start Indexer daemon
709
        koha-indexer --start "$name"
712
        koha-indexer --start "$name"
710
    fi
713
    fi
714
715
    if [ "$USE_HTTPS" = "yes" ]; then
716
        # Get letsencrypt certificates
717
        # TODO: fix path of letsencrypt
718
        /path/to/letsencrypt-auto --agree-tos --renew-by-default --webroot --server https://acme-v01.api.letsencrypt.org/directory certonly -w /usr/share/koha/opac/htdocs/ -d $opacdomain -w /usr/share/koha/intranet/htdocs/ -d $intradomain
719
        # enable all ssl settings (apache won't start with these before certs are present)
720
        sed -i "s:^\s*#\(\s*SSL.*\)$:\1:" "/etc/apache2/sites-available/$name.conf"
721
        # change port from 80 to 443. (apache won't start if it is 443 without certs present)
722
        sed -i "s:^\s*\(<VirtualHost \*\:\)80> #ssl$:\1443>:" "/etc/apache2/sites-available/$name.conf"
723
        # TODO: enable forward from 80 to https
724
        # restart apache with working certs
725
        service apache2 restart
726
    fi
711
fi
727
fi
712
728
713
729
714
- 

Return to bug 15303