Compare commits

...

11 Commits

17 changed files with 18880 additions and 44 deletions

View File

@@ -15,10 +15,13 @@ Role Variables
with their default value, if any with their default value, if any
koha_version: 21.05.05 koha_version: 21.05.05
koha_debian_version: 21.05
koha_home_dir: /home/koha koha_home_dir: /home/koha
koha_install_dir: "{{ koha_home_dir }}/koha" koha_install_dir: "{{ koha_home_dir }}/koha"
koha_src_dir: "{{ koha_home_dir }}/Koha-{{ koha_version }}" koha_src_dir: "{{ koha_home_dir }}/Koha-{{ koha_version }}"
koha_opac_hostname: koha.opendoor.fr koha_opac_hostname: koha.opendoor.fr
koha_user: koha
koha_group: koha
koha_intranet_hostname: sigb.opendoor.fr koha_intranet_hostname: sigb.opendoor.fr
koha_mariadb_server: localhost koha_mariadb_server: localhost
koha_mariadb_user: "kohauser" koha_mariadb_user: "kohauser"

View File

@@ -2,9 +2,12 @@
# defaults file for tco.koha # defaults file for tco.koha
koha_version: 21.05.07 koha_version: 21.05.07
koha_debian_version: 21.05
koha_home_dir: /home/koha koha_home_dir: /home/koha
koha_install_dir: "{{ koha_home_dir }}/koha" koha_install_dir: "{{ koha_home_dir }}/koha"
koha_src_dir: "{{ koha_home_dir }}/Koha-v{{ koha_version }}" koha_src_dir: "{{ koha_home_dir }}/Koha-v{{ koha_version }}"
koha_user: koha
koha_group: koha
koha_opac_hostname: koha.opendoor.fr koha_opac_hostname: koha.opendoor.fr
koha_intranet_hostname: sigb.opendoor.fr koha_intranet_hostname: sigb.opendoor.fr
koha_mariadb_server: localhost koha_mariadb_server: localhost
@@ -37,6 +40,7 @@ koha_packages:
- libbusiness-issn-perl - libbusiness-issn-perl
- libbytes-random-secure-perl - libbytes-random-secure-perl
- libcache-memcached-fast-safe-perl - libcache-memcached-fast-safe-perl
- libcache-memcached-fast-perl
- libcache-memcached-perl - libcache-memcached-perl
- libcgi-compile-perl - libcgi-compile-perl
- libcgi-emulate-psgi-perl - libcgi-emulate-psgi-perl
@@ -182,6 +186,7 @@ koha_packages:
- libyaml-libyaml-perl - libyaml-libyaml-perl
- libyaml-syck-perl - libyaml-syck-perl
- perl-doc - perl-doc
- starman
- unzip - unzip
- xmlstarlet - xmlstarlet
- xsltproc - xsltproc

View File

@@ -23,6 +23,12 @@
- apache-shared-opac-plack.conf - apache-shared-opac-plack.conf
notify: reload apache notify: reload apache
- name: disable default site
file:
path: "/etc/apache2/sites-enabled/000-default.conf"
state: "absent"
notify: reload apache
- name: activate required modules - name: activate required modules
apache2_module: apache2_module:
state: present state: present
@@ -33,6 +39,6 @@
- proxy_http - proxy_http
- ssl - ssl
- headers - headers
- cgi - cgid
notify: reload apache notify: reload apache

View File

@@ -11,9 +11,28 @@
# - assert: # - assert:
# that: result.stat.exists is false # that: result.stat.exists is false
- name: install prerequisites
tags: always
import_tasks: req.yml
- name: install memcached - name: install memcached
import_tasks: memcached.yml import_tasks: memcached.yml
- name: configure koha repo for dependencies
block:
- apt_key:
url: https://debian.koha-community.org/koha/gpg.asc
state: present
- apt_repository:
filename: koha
repo: "deb http://debian.koha-community.org/koha {{ koha_debian_version }} main"
state: present
- name: create koha group
ansible.builtin.group:
name: "{{ koha_group }}"
state: present
- name: create koha user - name: create koha user
vars: vars:
- kohapassword: $ANSIBLE_VAULT;1.1;AES256 - kohapassword: $ANSIBLE_VAULT;1.1;AES256
@@ -23,10 +42,12 @@
6333363164313030340a336430326334613435333161656435373962316266333765326462393238 6333363164313030340a336430326334613435333161656435373962316266333765326462393238
6237 6237
user: user:
name: koha name: "{{ koha_user }}"
group: "{{ koha_group }}"
home: "{{ koha_home_dir }}" home: "{{ koha_home_dir }}"
shell: /bin/bash
create_home: yes create_home: yes
password: "{{ kohapassword | password_hash('sha512', ansible_hostname )}}" password: "{{ kohapassword | password_hash('sha512',123456 | random( seed=ansible_hostname )|string)}}"
- name: get and extract archive - name: get and extract archive
block: block:
@@ -50,10 +71,9 @@
name: "{{ koha_packages }}" name: "{{ koha_packages }}"
- name: deploy Makefile - name: deploy Makefile
tags: wip
template: template:
src: "{{ item }}" src: "{{ item }}_{{ koha_version }}"
dest: "{{ koha_src_dir }}" dest: "{{ koha_src_dir }}/{{ item }}"
loop: loop:
- Makefile - Makefile
- MYMETA.json - MYMETA.json
@@ -61,7 +81,6 @@
register: result register: result
- name: make && & make install - name: make && & make install
tags: wip
command: "{{ item }}" command: "{{ item }}"
loop: loop:
- make - make
@@ -87,6 +106,11 @@
dest: /var/log/koha dest: /var/log/koha
state: link state: link
- name: configure log rotation
template:
src: logrotate.koha
dest: /etc/logrotate.d/koha
- name: configure apache - name: configure apache
import_tasks: apache.yml import_tasks: apache.yml
tags: apache tags: apache
@@ -96,14 +120,6 @@
tags: plack tags: plack
- name: add fr translation
command: perl translate install fr-FR
args:
chdir: "{{ koha_install_dir }}/misc/translator/"
- name: fix permissions - name: fix permissions
file: file:
path: "{{ koha_install_dir }}" path: "{{ koha_install_dir }}"
@@ -123,6 +139,19 @@
- "{{ koha_install_dir }}/var/log" - "{{ koha_install_dir }}/var/log"
- "{{ koha_install_dir }}/var/run" - "{{ koha_install_dir }}/var/run"
- name: set systempreference url
community.mysql.mysql_query:
login_db: "{{ koha_mariadb_db }}"
login_password: "{{ koha_mariadb_password }}"
login_user: "{{ koha_mariadb_user }}"
login_host: "{{ koha_mariadb_server }}"
query: UPDATE systempreferences set value = %(value)s WHERE variable=%(variable)s
named_args:
value: "{{ item.value }}"
variable: "{{ item.variable }}"
loop:
- { variable: "OPACBaseURL", value: "https://{{ koha_opac_hostname }}" }
- { variable: "staffClientBaseURL", value: "https://{{ koha_intranet_hostname }}" }
# cronjob # cronjob
# # zebra # # zebra
@@ -130,3 +159,4 @@
# cronjob # cronjob
# # zebra # # zebra
# traduction # traduction

10
tasks/req.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: install mandatory packages
apt:
cache_valid_time: 3600
state: present
name:
- git
- python3-pymysql
- librest-client-perl

View File

@@ -0,0 +1,221 @@
{
"abstract" : "Award-winning integrated library system (ILS) and Web OPAC",
"author" : [
"Koha Contributors <https://koha-community.org/>"
],
"dynamic_config" : 0,
"generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
"license" : [
"unknown"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "koha",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Algorithm::CheckDigits" : "0.5",
"AnyEvent" : "5.0",
"AnyEvent::HTTP" : "2.13",
"Archive::Extract" : "0.60",
"Archive::Zip" : "1.30",
"Array::Utils" : "0.5",
"Authen::CAS::Client" : "0.05",
"Biblio::EndnoteStyle" : "0.05",
"Business::ISBN" : "2.05",
"Business::ISSN" : "0.91",
"Bytes::Random::Secure" : "0.28",
"CGI" : "3.15",
"CGI::Carp" : "1.29",
"CGI::Compile" : ">= 0.17, != 0.24",
"CGI::Emulate::PSGI" : "0.20",
"CGI::Session" : "4.2",
"CGI::Session::Driver::memcached" : "0.04",
"CGI::Session::Serialize::yaml" : "4.2",
"CPAN::Meta" : "2.150006",
"Cache::Memcached" : "1.30",
"Cache::Memcached::Fast::Safe" : "0.06",
"Class::Accessor" : "0.3",
"Class::Factory::Util" : "1.6",
"Class::Inspector" : "1.31",
"Clone" : "0.37",
"Crypt::Eksblowfish::Bcrypt" : "0.008",
"DBD::Mock" : "1.39",
"DBD::SQLite2" : "0.33",
"DBD::mysql" : "4.004",
"DBI" : "1.53",
"DBIx::Class::Schema::Loader" : "0.07039",
"DBIx::RunSQL" : "0.14",
"Data::Dumper" : "2.121",
"Data::ICal" : "0.13",
"Date::Calc" : "5.4",
"Date::Manip" : "5.44",
"DateTime" : "0.58",
"DateTime::Event::ICal" : "0.08",
"DateTime::Format::ICal" : "0.09",
"DateTime::Format::MySQL" : "0.04",
"DateTime::TimeZone" : "1.20",
"Devel::Cover" : "0.89",
"Digest::MD5" : "2.36",
"Digest::SHA" : "5.43",
"Email::Date" : "1.103",
"Email::MessageID" : "1.406",
"Email::Sender" : "1.300030",
"Email::Stuffer" : "0.014",
"Email::Valid" : "0.190",
"Exception::Class" : "1.38",
"File::Copy" : "2.08",
"File::Path" : "2.07",
"File::Slurp" : "9999.13",
"File::Temp" : "0.22",
"Font::TTF" : "0.45",
"GD" : "2.39",
"GD::Barcode::UPCE" : "1.1",
"Getopt::Long" : "2.35",
"Getopt::Std" : "1.05",
"Graphics::Magick" : "v1.3.5",
"Gravatar::URL" : "1.03",
"HTML::Entities" : "3.69",
"HTML::FormatText" : "1.23",
"HTML::Scrubber" : "0.08",
"HTTP::Cookies" : "1.39",
"HTTP::OAI" : "3.2",
"HTTP::Request::Common" : "1.26",
"HTTPD::Bench::ApacheBench" : "0.73",
"IPC::Cmd" : "0.46",
"JSON" : "2.07",
"JSON::Validator" : "0.97",
"LWP::Protocol::https" : "5.836",
"LWP::Simple" : "1.41",
"LWP::UserAgent" : "2.033",
"Library::CallNumber::LC" : "0.22",
"Lingua::Ispell" : "0.07",
"Lingua::Stem" : "0.82",
"Lingua::Stem::Snowball" : "0.952",
"List::MoreUtils" : "0.21",
"List::Util" : "1.18",
"Locale::Currency::Format" : "1.28",
"Locale::Language" : "2.07",
"Locale::Messages" : "1.20",
"Locale::PO" : "0.24",
"Locale::XGettext::TT2" : "0.7",
"Log::Log4perl" : "1.29",
"MARC::Charset" : "0.98",
"MARC::File::XML" : "v1.0.1",
"MARC::Record" : "v2.0.6",
"MARC::Record::MiJ" : "0.04",
"MIME::Base64" : "3.07",
"MIME::Lite" : "3",
"MIME::QuotedPrint" : "3.07",
"Modern::Perl" : "1.03",
"Module::Bundled::Files" : "0.03",
"Module::CPANfile" : "1.1000",
"Module::Load::Conditional" : "0.38",
"Module::Pluggable" : "3.9",
"Mojolicious" : "7.21",
"Mojolicious::Plugin::OpenAPI" : "1.15",
"Moo" : "1",
"Net::CIDR" : "0.17",
"Net::LDAP" : "0.33",
"Net::LDAP::Filter" : "0.14",
"Net::Netmask" : "1.9022",
"Net::OAuth2::AuthorizationServer" : "0.16",
"Net::SFTP::Foreign" : "1.73",
"Net::Server" : "0.97",
"Net::Stomp" : "0.57",
"Net::Z3950::SimpleServer" : "1.15",
"Net::Z3950::ZOOM" : "1.16",
"Number::Format" : "1.52",
"OpenOffice::OODoc" : "2.125",
"PDF::API2" : "2",
"PDF::FromHTML" : "0.31",
"PDF::Reuse" : "0.36",
"PDF::Reuse::Barcode" : "0.05",
"PDF::Table" : "v0.9.3",
"POSIX" : "1.09",
"Parallel::ForkManager" : "0.75",
"Plack::Middleware::LogWarn" : "0.001002",
"Plack::Middleware::ReverseProxy" : "0.14",
"Readonly" : "2.00",
"SMS::Send" : "0.05",
"Schedule::At" : "1.06",
"Search::Elasticsearch" : "5.01",
"Selenium::Remote::Driver" : "1.27",
"Sereal::Decoder" : "3.0",
"Sereal::Encoder" : "3.0",
"Storable" : "2.20",
"String::Random" : "0.22",
"Sys::CPU" : "0.52",
"Template" : ">= 2.22, != 3.008",
"Template::Plugin::HtmlToText" : "0.03",
"Template::Plugin::JSON::Escape" : "0.02",
"Template::Plugin::Stash" : "1.006",
"Term::ANSIColor" : "1.1",
"Test" : "1.25",
"Test::DBIx::Class" : "0.42",
"Test::Deep" : "0.106",
"Test::Exception" : "0.35",
"Test::Harness" : "2.56",
"Test::MockModule" : "0.05",
"Test::MockObject" : "1.09",
"Test::MockTime" : "0.13",
"Test::More" : "1.302073",
"Test::Strict" : "0.14",
"Test::WWW::Mechanize" : "1.42",
"Test::Warn" : "0.21",
"Test::YAML::Valid" : "0.04",
"Text::Bidi" : "0.03",
"Text::CSV" : "0.01",
"Text::CSV::Encoded" : "0.09",
"Text::CSV::Unicode" : "0.40",
"Text::CSV_XS" : "0.32",
"Text::Iconv" : "1.7",
"Text::PDF" : "0.29",
"Text::Unidecode" : "0.04",
"Text::Wrap" : "2005.082401",
"Time::Fake" : "0.11",
"Time::HiRes" : "1.86",
"Time::localtime" : "1.02",
"Try::Tiny" : "0.22",
"UNIVERSAL::can" : "1.10",
"UNIVERSAL::require" : "0.13",
"URI::Escape" : "3.31",
"UUID" : "0.05",
"Unicode::Normalize" : "0.32",
"WWW::CSRF" : "1.00",
"WebService::ILS" : "0.17",
"XML::Dumper" : "0.81",
"XML::LibXML" : "1.59",
"XML::LibXSLT" : "1.59",
"XML::RSS" : "1.31",
"XML::SAX::ParserFactory" : "1.01",
"XML::SAX::Writer" : "0.44",
"XML::Simple" : "2.14",
"XML::Writer" : "0.614",
"YAML" : "0.71",
"YAML::Syck" : "0.71"
}
}
},
"release_status" : "stable",
"version" : "v20.11.06.000",
"x_serialization_backend" : "JSON::PP version 4.04"
}

View File

@@ -0,0 +1,202 @@
---
abstract: 'Award-winning integrated library system (ILS) and Web OPAC'
author:
- 'Koha Contributors <https://koha-community.org/>'
build_requires:
ExtUtils::MakeMaker: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: koha
no_index:
directory:
- t
- inc
requires:
Algorithm::CheckDigits: '0.5'
AnyEvent: '5.0'
AnyEvent::HTTP: '2.13'
Archive::Extract: '0.60'
Archive::Zip: '1.30'
Array::Utils: '0.5'
Authen::CAS::Client: '0.05'
Biblio::EndnoteStyle: '0.05'
Business::ISBN: '2.05'
Business::ISSN: '0.91'
Bytes::Random::Secure: '0.28'
CGI: '3.15'
CGI::Carp: '1.29'
CGI::Compile: '>= 0.17, != 0.24'
CGI::Emulate::PSGI: '0.20'
CGI::Session: '4.2'
CGI::Session::Driver::memcached: '0.04'
CGI::Session::Serialize::yaml: '4.2'
CPAN::Meta: '2.150006'
Cache::Memcached: '1.30'
Cache::Memcached::Fast::Safe: '0.06'
Class::Accessor: '0.3'
Class::Factory::Util: '1.6'
Class::Inspector: '1.31'
Clone: '0.37'
Crypt::Eksblowfish::Bcrypt: '0.008'
DBD::Mock: '1.39'
DBD::SQLite2: '0.33'
DBD::mysql: '4.004'
DBI: '1.53'
DBIx::Class::Schema::Loader: '0.07039'
DBIx::RunSQL: '0.14'
Data::Dumper: '2.121'
Data::ICal: '0.13'
Date::Calc: '5.4'
Date::Manip: '5.44'
DateTime: '0.58'
DateTime::Event::ICal: '0.08'
DateTime::Format::ICal: '0.09'
DateTime::Format::MySQL: '0.04'
DateTime::TimeZone: '1.20'
Devel::Cover: '0.89'
Digest::MD5: '2.36'
Digest::SHA: '5.43'
Email::Date: '1.103'
Email::MessageID: '1.406'
Email::Sender: '1.300030'
Email::Stuffer: '0.014'
Email::Valid: '0.190'
Exception::Class: '1.38'
File::Copy: '2.08'
File::Path: '2.07'
File::Slurp: '9999.13'
File::Temp: '0.22'
Font::TTF: '0.45'
GD: '2.39'
GD::Barcode::UPCE: '1.1'
Getopt::Long: '2.35'
Getopt::Std: '1.05'
Graphics::Magick: v1.3.5
Gravatar::URL: '1.03'
HTML::Entities: '3.69'
HTML::FormatText: '1.23'
HTML::Scrubber: '0.08'
HTTP::Cookies: '1.39'
HTTP::OAI: '3.2'
HTTP::Request::Common: '1.26'
HTTPD::Bench::ApacheBench: '0.73'
IPC::Cmd: '0.46'
JSON: '2.07'
JSON::Validator: '0.97'
LWP::Protocol::https: '5.836'
LWP::Simple: '1.41'
LWP::UserAgent: '2.033'
Library::CallNumber::LC: '0.22'
Lingua::Ispell: '0.07'
Lingua::Stem: '0.82'
Lingua::Stem::Snowball: '0.952'
List::MoreUtils: '0.21'
List::Util: '1.18'
Locale::Currency::Format: '1.28'
Locale::Language: '2.07'
Locale::Messages: '1.20'
Locale::PO: '0.24'
Locale::XGettext::TT2: '0.7'
Log::Log4perl: '1.29'
MARC::Charset: '0.98'
MARC::File::XML: v1.0.1
MARC::Record: v2.0.6
MARC::Record::MiJ: '0.04'
MIME::Base64: '3.07'
MIME::Lite: '3'
MIME::QuotedPrint: '3.07'
Modern::Perl: '1.03'
Module::Bundled::Files: '0.03'
Module::CPANfile: '1.1000'
Module::Load::Conditional: '0.38'
Module::Pluggable: '3.9'
Mojolicious: '7.21'
Mojolicious::Plugin::OpenAPI: '1.15'
Moo: '1'
Net::CIDR: '0.17'
Net::LDAP: '0.33'
Net::LDAP::Filter: '0.14'
Net::Netmask: '1.9022'
Net::OAuth2::AuthorizationServer: '0.16'
Net::SFTP::Foreign: '1.73'
Net::Server: '0.97'
Net::Stomp: '0.57'
Net::Z3950::SimpleServer: '1.15'
Net::Z3950::ZOOM: '1.16'
Number::Format: '1.52'
OpenOffice::OODoc: '2.125'
PDF::API2: '2'
PDF::FromHTML: '0.31'
PDF::Reuse: '0.36'
PDF::Reuse::Barcode: '0.05'
PDF::Table: v0.9.3
POSIX: '1.09'
Parallel::ForkManager: '0.75'
Plack::Middleware::LogWarn: '0.001002'
Plack::Middleware::ReverseProxy: '0.14'
Readonly: '2.00'
SMS::Send: '0.05'
Schedule::At: '1.06'
Search::Elasticsearch: '5.01'
Selenium::Remote::Driver: '1.27'
Sereal::Decoder: '3.0'
Sereal::Encoder: '3.0'
Storable: '2.20'
String::Random: '0.22'
Sys::CPU: '0.52'
Template: '>= 2.22, != 3.008'
Template::Plugin::HtmlToText: '0.03'
Template::Plugin::JSON::Escape: '0.02'
Template::Plugin::Stash: '1.006'
Term::ANSIColor: '1.1'
Test: '1.25'
Test::DBIx::Class: '0.42'
Test::Deep: '0.106'
Test::Exception: '0.35'
Test::Harness: '2.56'
Test::MockModule: '0.05'
Test::MockObject: '1.09'
Test::MockTime: '0.13'
Test::More: '1.302073'
Test::Strict: '0.14'
Test::WWW::Mechanize: '1.42'
Test::Warn: '0.21'
Test::YAML::Valid: '0.04'
Text::Bidi: '0.03'
Text::CSV: '0.01'
Text::CSV::Encoded: '0.09'
Text::CSV::Unicode: '0.40'
Text::CSV_XS: '0.32'
Text::Iconv: '1.7'
Text::PDF: '0.29'
Text::Unidecode: '0.04'
Text::Wrap: '2005.082401'
Time::Fake: '0.11'
Time::HiRes: '1.86'
Time::localtime: '1.02'
Try::Tiny: '0.22'
UNIVERSAL::can: '1.10'
UNIVERSAL::require: '0.13'
URI::Escape: '3.31'
UUID: '0.05'
Unicode::Normalize: '0.32'
WWW::CSRF: '1.00'
WebService::ILS: '0.17'
XML::Dumper: '0.81'
XML::LibXML: '1.59'
XML::LibXSLT: '1.59'
XML::RSS: '1.31'
XML::SAX::ParserFactory: '1.01'
XML::SAX::Writer: '0.44'
XML::Simple: '2.14'
XML::Writer: '0.614'
YAML: '0.71'
YAML::Syck: '0.71'
version: v20.11.06.000
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

18339
templates/Makefile_20.11.06 Normal file

File diff suppressed because one or more lines are too long

View File

@@ -17517,7 +17517,7 @@ export __RUN_DATABASE_TESTS__ := no
export __DB_USE_TLS__ := no export __DB_USE_TLS__ := no
export __DB_PORT__ := 3306 export __DB_PORT__ := 3306
export __SMTP_SSL_MODE__ := starttls export __SMTP_SSL_MODE__ := starttls
export __ZEBRA_MARC_FORMAT__ := marc21 export __ZEBRA_MARC_FORMAT__ := unimarc
export __ZEBRA_PASS__ := zebrastripes export __ZEBRA_PASS__ := zebrastripes
export __MEMCACHED_SERVERS__ := 127.0.0.1:11211 export __MEMCACHED_SERVERS__ := 127.0.0.1:11211
export __DB_PASS__ := {{ koha_mariadb_password }} export __DB_PASS__ := {{ koha_mariadb_password }}

View File

@@ -18,16 +18,18 @@
SetEnv KOHA_CONF "{{ koha_install_dir }}/etc/koha-conf.xml" SetEnv KOHA_CONF "{{ koha_install_dir }}/etc/koha-conf.xml"
SetEnv PERL5LIB "{{ koha_install_dir }}/lib" SetEnv PERL5LIB "{{ koha_install_dir }}/lib"
SetEnv MEMCACHED_SERVERS "127.0.0.1:11211" SetEnv MEMCACHED_SERVERS "127.0.0.1:11211"
SetEnv MEMCACHED_NAMESPACE "koha_library" SetEnv MEMCACHED_NAMESPACE "KOHA"
SetEnv DEBUG 1 SetEnv DEBUG 1
Options +FollowSymLinks Options +FollowSymLinks
SSLEngine on <IfModule mod_ssl>
SSLProtocol all -SSLv2 SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW SSLProtocol all -SSLv2
SSLCertificateFile {{ koha_apache_ssl_cert }} SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateKeyFile {{ koha_apache_ssl_key }} SSLCertificateFile {{ koha_apache_ssl_cert }}
SSLCertificateChainFile {{ koha_apache_ssl_chain }} SSLCertificateKeyFile {{ koha_apache_ssl_key }}
SSLCertificateChainFile {{ koha_apache_ssl_chain }}
</IfModule>
ErrorDocument 400 /cgi-bin/koha/errors/400.pl ErrorDocument 400 /cgi-bin/koha/errors/400.pl
ErrorDocument 401 /cgi-bin/koha/errors/401.pl ErrorDocument 401 /cgi-bin/koha/errors/401.pl

View File

@@ -15,16 +15,18 @@
SetEnv KOHA_CONF "{{ koha_install_dir }}/etc/koha-conf.xml" SetEnv KOHA_CONF "{{ koha_install_dir }}/etc/koha-conf.xml"
SetEnv PERL5LIB "{{ koha_install_dir }}/lib" SetEnv PERL5LIB "{{ koha_install_dir }}/lib"
SetEnv MEMCACHED_SERVERS "127.0.0.1:11221" SetEnv MEMCACHED_SERVERS "127.0.0.1:11221"
SetEnv MEMCACHED_NAMESPACE "koha_library" SetEnv MEMCACHED_NAMESPACE "KOHA"
Include /etc/koha/apache-shared-opac-plack.conf Include /etc/koha/apache-shared-opac-plack.conf
SSLEngine on <IfModule mod_ssl>
SSLProtocol all -SSLv2 SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW SSLProtocol all -SSLv2
SSLCertificateFile {{ koha_apache_ssl_cert }} SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateKeyFile {{ koha_apache_ssl_key }} SSLCertificateFile {{ koha_apache_ssl_cert }}
SSLCertificateChainFile {{ koha_apache_ssl_chain }} SSLCertificateKeyFile {{ koha_apache_ssl_key }}
SSLCertificateChainFile {{ koha_apache_ssl_chain }}
</IfModule>
<Directory "{{ koha_install_dir }}/opac/htdocs"> <Directory "{{ koha_install_dir }}/opac/htdocs">
Options -Indexes Options -Indexes

16
templates/logrotate.koha Normal file
View File

@@ -0,0 +1,16 @@
# Rotate log files for all Koha instances.
{{ koha_install_dir }}/var/log/*log {
rotate 5
weekly
missingok
compress
su {{ koha_user }} {{ koha_group }}
delaycompress
notifempty
sharedscripts
postrotate
/bin/systemctl restart plack.service zebrasrv.service koha-sip
endscript
}

View File

@@ -5,7 +5,7 @@ After=network.target remote-fs.target nss-lookup.target
[Service] [Service]
Environment="KOHA_CONF={{ koha_install_dir }}/etc/koha-conf.xml" Environment="KOHA_CONF={{ koha_install_dir }}/etc/koha-conf.xml"
Environment="PERL5LIB={{ koha_install_dir }}/lib" Environment="PERL5LIB={{ koha_install_dir }}/lib"
KOHA_HOME={{ koha_install_dir }} Environment="KOHA_HOME={{ koha_install_dir }}"
Type=forking Type=forking
User=root User=root
ExecStart={{ koha_install_dir }}/bin/plack/koha-plack --start foobar ExecStart={{ koha_install_dir }}/bin/plack/koha-plack --start foobar

View File

@@ -23,7 +23,7 @@ set -e
# Read configuration variable file if it is present # Read configuration variable file if it is present
[ -r /etc/default/koha-common ] && . /etc/default/koha-common [ -r /etc/default/koha-common ] && . /etc/default/koha-common
export PERL5LIB=/home/koha/koha/lib export PERL5LIB={{ koha_install_dir }}/lib
usage() usage()
{ {
@@ -53,9 +53,9 @@ start_plack()
{ {
local instancename=$1 local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid" local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
local PLACKSOCKET="/home/koha/koha/var/run/plack.sock" local PLACKSOCKET="{{ koha_install_dir }}/var/run/plack.sock"
local PSGIFILE="/home/koha/koha/bin/plack/koha.psgi" local PSGIFILE="{{ koha_install_dir }}/bin/plack/koha.psgi"
local NAME="${instancename}-koha-plack" local NAME="${instancename}-koha-plack"
if [ -e "/etc/koha/plack.psgi" ]; then if [ -e "/etc/koha/plack.psgi" ]; then
@@ -71,7 +71,7 @@ start_plack()
-E deployment --socket ${PLACKSOCKET} ${PSGIFILE}" -E deployment --socket ${PLACKSOCKET} ${PSGIFILE}"
if ! is_plack_running ${instancename}; then if ! is_plack_running ${instancename}; then
export KOHA_CONF="/home/koha/koha/etc/koha-conf.xml" export KOHA_CONF="{{ koha_install_dir }}/etc/koha-conf.xml"
if [ -e "/etc/koha/koha-conf.xml" ]; then if [ -e "/etc/koha/koha-conf.xml" ]; then
# pick instance-specific psgi file # pick instance-specific psgi file
KOHA_CONF="/etc/koha/koha-conf.xml" KOHA_CONF="/etc/koha/koha-conf.xml"
@@ -94,7 +94,7 @@ stop_plack()
{ {
local instancename=$1 local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid" local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
if is_plack_running ${instancename}; then if is_plack_running ${instancename}; then
@@ -115,7 +115,7 @@ stop_plack()
restart_plack() restart_plack()
{ {
local instancename=$1 local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid" local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
if is_plack_running ${instancename}; then if is_plack_running ${instancename}; then
@@ -195,7 +195,7 @@ is_plack_running()
{ {
local instancename=$1 local instancename=$1
if start-stop-daemon --pidfile "/home/koha/koha/var/run/plack.pid" \ if start-stop-daemon --pidfile "{{ koha_install_dir }}/var/run/plack.pid" \
--status ; then --status ; then
return 0 return 0
else else

View File

@@ -17,8 +17,8 @@
use Modern::Perl; use Modern::Perl;
use lib("/home/koha/koha/lib"); use lib("{{ koha_install_dir }}/lib");
use lib("/home/koha/koha/lib/installer"); use lib("{{ koha_install_dir }}/lib/installer");
use Plack::Builder; use Plack::Builder;
use Plack::App::CGIBin; use Plack::App::CGIBin;
@@ -54,16 +54,16 @@ use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise
} }
my $intranet = Plack::App::CGIBin->new( my $intranet = Plack::App::CGIBin->new(
root => '/home/koha/koha/intranet/cgi-bin' root => '{{ koha_install_dir }}/intranet/cgi-bin'
)->to_app; )->to_app;
my $opac = Plack::App::CGIBin->new( my $opac = Plack::App::CGIBin->new(
root => '/home/koha/koha/opac/cgi-bin/opac' root => '{{ koha_install_dir }}/opac/cgi-bin/opac'
)->to_app; )->to_app;
my $apiv1 = builder { my $apiv1 = builder {
my $server = Mojo::Server::PSGI->new; my $server = Mojo::Server::PSGI->new;
$server->load_app('/home/koha/koha/api/v1/app.pl'); $server->load_app('{{ koha_install_dir }}/api/v1/app.pl');
$server->to_psgi_app; $server->to_psgi_app;
}; };