diff --git a/Repositories/otago_eprints3/Makefile b/Repositories/otago_eprints3/Makefile index ce9e3e1..2b01fda 100755 --- a/Repositories/otago_eprints3/Makefile +++ b/Repositories/otago_eprints3/Makefile @@ -8,8 +8,7 @@ # EPRINTS_ROOT: /path/to/eprints/installation # EPRINTS_USER: the user that owns the EPrints directory # EPRINTS_GROUP: the group that owns the EPrints directory -# APACHE_STOP: the command to stop Apache -# APACHE_START: the command to start Apache +# APACHE_RESTART: the command to restart Apache # # Used in archive XML configuration files # EPRINTS_HOST: eprints host name @@ -51,7 +50,8 @@ .PHONY: deploy generate_apacheconf import_subjects generate_static \ - generate_abstracts generate_views restart_apache index stats + generate_abstracts generate_views reload_config restart_apache \ + index #stats deploy: $(GENERATED_FILES) @@ -60,12 +60,12 @@ --exclude='*.make' --exclude='*_src.*' \ --recursive --times . $(EPRINTS_ROOT)/archives > .del-rsync-output @-grep $(ARCHIVE_NAME) .del-rsync-output - @-grep --quiet "cfg\\.d/\\(10_core\\)\\|\\(20_baseurls\\)" .del-rsync-output && $(MAKE) generate_apacheconf - @-grep --quiet "cfg/subjects" .del-rsync-output && $(MAKE) import_subjects - @-grep --quiet "cfg/\\(static\\|lang\\)/" .del-rsync-output && $(MAKE) generate_static - @-grep --quiet "\\(cfg/subjects\\)\\|\\(cfg/citations\\)" .del-rsync-output && $(MAKE) generate_views - @-grep --quiet "\\(cfg\\.d/eprint_render\\)\\|\\(cfg/citations\\)\\|\\(document_formats\\)" .del-rsync-output && $(MAKE) generate_abstracts - @-grep --quiet "\\(\\.conf\\)\\|\\(\\.pl\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) restart_apache + @-grep -q "cfg\\.d/\\(10_core\\)\\|\\(20_baseurls\\)" .del-rsync-output && $(MAKE) generate_apacheconf + @-grep -q "cfg/subjects" .del-rsync-output && $(MAKE) import_subjects + @-grep -q "cfg/\\(static\\|lang\\)/" .del-rsync-output && $(MAKE) generate_static + @-grep -q "\\(cfg/subjects\\)\\|\\(cfg/citations\\)" .del-rsync-output && $(MAKE) generate_views + @-grep -q "\\(cfg\\.d/eprint_render\\)\\|\\(cfg/citations\\)\\|\\(document_formats\\)" .del-rsync-output && $(MAKE) generate_abstracts + @-grep -q "\\(\\.conf\\)\\|\\(\\.pl\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) reload_config @rm -f .del-rsync-output @@ -105,13 +105,14 @@ @$(SUDO) $(BINDIR)/$@ $(ARCHIVE_NAME) +reload_config: + @announce "Reloading configuration for $(ARCHIVE_NAME)..." + $(SUDO) $(BINDIR)/epadmin reload $(ARCHIVE_NAME) + + restart_apache: - @announce "Waiting for Apache to shut down..." - @sudo $(APACHE_STOP) - @while `pgrep "apache|httpd" > /dev/null`; do echo > /dev/null; done - @announce "Waiting for Apache to start up..." - @sudo $(APACHE_START) - @until `pgrep "apache|httpd" > /dev/null`; do echo > /dev/null; done + @announce "Restarting Apache..." + @sudo $(APACHE_RESTART) index: