Koha/debian/scripts
Tomas Cohen Arazi 4e7734ce33 Bug 16016: Sitemap handling scripts for packages
This patch introduces the koha-sitemap script. This script wraps calls to
the misc/cronjobs/sitemap.pl script so it can be done easily instance-wise.

It sets /var/lib/koha/${instance}/sitemap as the destination directory for
the sitemap files. A followup will make them available through an Apache
configuration entry.

koha-functions.sh is provided with a handy is_sitemap_enabled function so
we can later add filters to other commands (koha-list, koha-foreach, etc).

Exposes sitemap files to apache. This is suitable for including the sitemap in
the robots.txt file as proposed in

  http://www.sitemaps.org/protocol.html#submit_robots

Note: it depends on Apache 2.4+ so we can patch the file as needed. Older
Apache users will be warned that they need to tweak the apache files on their
own.

To test:
- You can build a package out of this patchset, or do the following on a kohadevbox
  cp debian/scripts/koha-functions.sh /usr/share/koha/bin
- Run
  $ debian/scripts/koha-sitemap --help
- Go through all the options (--enable, --disable, generate).
(a) --enable:
  - debian/scripts/koha-sitemap --enable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is created
  - call it again, a suitable warning is raised and the file is still there
(b) debian/scripts/koha-sitemap --disable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is deleted
  - call it again, a suitable warning is raised and the file does not exist
(c) --generate:
  - debian/scripts/koha-sitemap --generate kohadev
=> SUCCESS: sitemapindex.xml and sitemap000X.xml files are generated in
            /var/lib/koha/kohadev/sitemap/
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:34:21 +00:00
..
koha-create Bug 15303 Followup: If install LE dependencies from backports on Jessie 2016-04-29 13:04:32 +00:00
koha-create-dirs
koha-disable
koha-dump Bug 14532: (followup) Use tar's --exclude for simplicity 2016-03-02 04:39:51 +00:00
koha-dump-defaults
koha-email-disable
koha-email-enable
koha-enable
koha-enable-sip
koha-foreach Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
koha-functions.sh Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
koha-indexer
koha-list Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
koha-mysql
koha-mysqlcheck
koha-passwd Bug 13143 - Detect if the password is in a pipe 2016-01-27 06:27:08 +00:00
koha-plack
koha-rebuild-zebra [SIGNED-OFF] Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip if enabled 2016-04-19 17:47:42 +00:00
koha-remove Bug 15303 Followup for koha-remove 2016-04-29 13:04:31 +00:00
koha-reset-passwd
koha-restart-zebra
koha-restore
koha-run-backups
koha-shell
koha-sitemap Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
koha-start-sip
koha-start-zebra Bug 15714: Remove zebra.log and add loglevels 2016-02-24 03:38:18 +00:00
koha-stop-sip
koha-stop-zebra Bug 15714: Remove zebra.log and add loglevels 2016-02-24 03:38:18 +00:00
koha-translate
koha-upgrade-schema
koha-upgrade-to-3.4