- Timestamp:
- 2009-02-20T13:32:31+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/Makefile.in
r18494 r18560 68 68 done 69 69 70 configure-cgi: 71 @if test ! -z "$(GSDLHOME)" ; then \ 72 echo "Configuring cgi-bin/gsdlsite.cfg" ; \ 73 sed "s@\*\*GSDLHOME\*\*@$(GSDLHOME)@g" cgi-bin/gsdlsite.cfg.in > cgi-bin/gsdlsite.cfg ; \ 70 71 72 test-gsdlhome: 73 @ if test -z "$(GSDLHOME)" ; then \ 74 echo "" ; \ 75 echo "Environment variable GSDLHOME not set." ; \ 76 echo " This needs to be set to run this Makefile target." ; \ 77 echo " Have you run 'source setup.bash'?" ; \ 78 echo "" ; \ 79 exit 1; \ 74 80 else \ 75 echo "Environment variable GSDLHOME not set. Have you run 'source setup.bash'?" ; \ 81 echo "Using: " ; \ 82 echo " GSDLHOME = ${GSDLHOME}" ; \ 83 echo " GSDLOS = ${GSDLOS}" ; \ 76 84 fi 77 85 86 configure-cgi: test-gsdlhome 87 @ echo "Configuring cgi-bin/gsdlsite.cfg" ; 88 sed "s@\*\*GSDLHOME\*\*@$(GSDLHOME)@g" cgi-bin/gsdlsite.cfg.in > cgi-bin/gsdlsite.cfg ; 78 89 79 configure-admin: 80 @ if test ! -z "$(GSDLHOME)" ; then \ 81 echo "" ; \ 82 echo "Configuring admin user password:" ; \ 83 encrypted_password=`getpw` ; \ 84 if [ $$? = "0" ] ; then \ 85 echo -e "[admin]\n<enabled>true\n<groups>administrator,colbuilder,all-collections-editor\n<password>$$encrypted_password\n<username>admin" \ 86 | txt2db -append "${GSDLHOME}/etc/users.db" ; \ 87 fi \ 88 else \ 89 echo "Environment variable GSDLHOME not set. Have you run 'source setup.bash'?" ; \ 90 91 92 configure-admin: test-gsdlhome 93 @echo "" ; 94 @echo "Configuring admin user password:" ; 95 encrypted_password=`getpw` ; 96 if [ $$? = "0" ] ; then \ 97 echo -e "[admin]\n<enabled>true\n<groups>administrator,colbuilder,all-collections-editor\n<password>$$encrypted_password\n<username>admin" \ 98 | txt2db -append "${GSDLHOME}/etc/users.db" ; \ 90 99 fi 91 100 @echo "" 92 101 102 configure-port: test-gsdlhome 103 @ echo "Enter port number to use:" 104 @ ( read port ; \ 105 if test ! -z $$port ; then \ 106 echo "Stopping web server (if running)" ; \ 107 make web-stop-tested ; \ 108 echo "Setting config file to use port $$port"; \ 109 cat "${GSDLHOME}/apache-httpd/conf/httpd.conf" \ 110 | sed "s/^Listen [0-9]\+/Listen $$port/" \ 111 > "${GSDLHOME}/apache-httpd/conf/httpd.conf.new" ; \ 112 echo "Type 'make web-start' to start the web server running on port $$port" ; \ 113 fi ; \ 114 echo "Done" ; ) 115 116 MONITOR_SUCCESS="MAKE SUCCESSFUL" 117 MONITOR_FAILED="MAKE FAILED" 118 MONITOR_FINISHED="MAKE DONE" 93 119 120 web-status: test-gsdlhome 121 ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl status 122 123 web-start: test-gsdlhome 124 ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl start 125 @ echo $(MONITOR_SUCCESS) 126 @ echo $(MONITOR_FINISHED) 127 128 web-restart: test-gsdlhome 129 ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl restart 130 @ echo $(MONITOR_SUCCESS) 131 @ echo $(MONITOR_FINISHED) 132 133 web-graceful: test-gsdlhome 134 ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl graceful 135 @ echo $(MONITOR_SUCCESS) 136 @ echo $(MONITOR_FINISHED) 137 138 web-stop-tested: 139 @# This version runs without testing for GSDLHOME 140 @# Useful to be run as a target when we know test-gsdlhome has already 141 @# been done. This avoids a unnecessary repetition of printing 142 @# out the values of GSDLHOME and GSDLOS 143 ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl stop 144 @ echo $(MONITOR_SUCCESS) 145 @ echo $(MONITOR_FINISHED) 146 147 web-stop: test-gsdlhome web-stop-tested 94 148 95 149
Note:
See TracChangeset
for help on using the changeset viewer.