[Hejes-devel] [715] main makefile: targets for enabling/disabling down for maint.

hejes-devel at nytud.hu hejes-devel at nytud.hu
Wed May 8 00:48:33 CEST 2013


Revision: 715
Author:   mihaltz
Date:     2013-05-08 00:48:33 +0200 (Wed, 08 May 2013)
Log Message:
-----------
main makefile: targets for enabling/disabling down for maint. message page as default
install makefile: create symlink for hyph_hu_HU.dic (/usr/local/lib copy only!)
added GA id to down_for__maintenance app

Modified Paths:
--------------
    Makefile
    maintenance.log
    trunk/install/Makefile
    trunk/misc/test_pyhyphen.py
    trunk/web2py/applications/down_for_maintenance/models/menu.py
    trunk/web2py/applications/helyesiras_webdev/modules/resources/README

Modified: Makefile
===================================================================
--- Makefile	2013-05-07 22:37:37 UTC (rev 714)
+++ Makefile	2013-05-07 22:48:33 UTC (rev 715)
@@ -1,6 +1,8 @@
 DIR=/opt/web2py
 APPDIR=helyesiras
 
+.PHONY : check-tag create_tag deploy dfm_on dfm_off restart
+
 all:
 
 # This target is used by deploy and create_tag to check if variable TAG was set
@@ -42,11 +44,27 @@
 	date >> maintenance.log
 	echo "Deployed $(TAG) to $(DIR)/applications/$(APPDIR)" >> maintenance.log
 
+# Put out the "down for maintenance" application as default
+dfm_on:
+	cp /opt/web2py/routes.py.down /opt/web2py/routes.py
+	sudo service uwsgi restart
+	hostname >> maintenance.log
+	date >> maintenance.log
+	echo "Restarted uwsgi" >> maintenance.log
+
+# Change the helyesiras application back as default
+dfm_off:
+	cp /opt/web2py/routes.py.ezit /opt/web2py/routes.py
+	sudo service uwsgi restart
+	hostname >> maintenance.log
+	date >> maintenance.log
+	echo "Restarted uwsgi" >> maintenance.log
+
 # Restart webserver
 restart:
 #       sudo /etc/init.d/nginx restart
-        sudo service uwsgi restart
-        hostname >> maintenance.log
-        date >> maintenance.log
-        echo "Restarted uwsgi" >> maintenance.log
+	sudo service uwsgi restart
+	hostname >> maintenance.log
+	date >> maintenance.log
+	echo "Restarted uwsgi" >> maintenance.log
 

Modified: maintenance.log
===================================================================
--- maintenance.log	2013-05-07 22:37:37 UTC (rev 714)
+++ maintenance.log	2013-05-07 22:48:33 UTC (rev 715)
@@ -31,3 +31,9 @@
 szotar.nytud.hu
 Mon May  6 00:13:59 CEST 2013
 Restarted uwsgi
+szotar.nytud.hu
+Tue May  7 00:26:47 CEST 2013
+Restarted uwsgi
+szotar.nytud.hu
+Tue May  7 00:41:24 CEST 2013
+Restarted uwsgi

Modified: trunk/install/Makefile
===================================================================
--- trunk/install/Makefile	2013-05-07 22:37:37 UTC (rev 714)
+++ trunk/install/Makefile	2013-05-07 22:48:33 UTC (rev 715)
@@ -32,6 +32,7 @@
 	cd ./PyHyphen-1.0beta1 ; \
 	sudo python ./setup.py install
 	sudo cp hyph_hu_HU.dic /usr/local/lib/python2.7/dist-packages/hyphen/
+	sudo ln -s /usr/local/lib/python2.7/dist-packages/hyphen/hyph_hu_HU.dic /usr/local/lib/python2.7/dist-packages/hyphen/hu_HU
 # TODO: use the actual python dist dir, e.g. python2.6 on clara
 
 #DEPRECATED: we must use pyhyphen-1.0 + default dictionary for now instead of pyhyphen-2.0

Modified: trunk/misc/test_pyhyphen.py
===================================================================
--- trunk/misc/test_pyhyphen.py	2013-05-07 22:37:37 UTC (rev 714)
+++ trunk/misc/test_pyhyphen.py	2013-05-07 22:48:33 UTC (rev 715)
@@ -10,7 +10,6 @@
 
 import os
 import sys
-import re
 from hyphen import Hyphenator
 
 
@@ -20,6 +19,7 @@
 #hun_hyphn = Hyphenator('hu_HU')
 #hun_hyphn = Hyphenator('hu_HU', 1, 1, 1, 1, directory=os.path.dirname(os.path.realpath(__file__))+'/resources')
 hun_hyphn = Hyphenator('hu_HU', 1, 1, 1, 1, directory='../web2py/applications/helyesiras_webdev/modules/resources')
+#hun_hyphn = Hyphenator('hu_HU', 1, 1, 1, 1, directory='/home/oravecz/lib/hyphen')
 
 while True:
   line = sys.stdin.readline()

Modified: trunk/web2py/applications/down_for_maintenance/models/menu.py
===================================================================
--- trunk/web2py/applications/down_for_maintenance/models/menu.py	2013-05-07 22:37:37 UTC (rev 714)
+++ trunk/web2py/applications/down_for_maintenance/models/menu.py	2013-05-07 22:48:33 UTC (rev 715)
@@ -17,7 +17,7 @@
 response.meta.generator = 'Web2py Web Framework'
 
 ## your http://google.com/analytics id
-response.google_analytics_id = None
+response.google_analytics_id = 'UA-40105656-1'
 
 #########################################################################
 ## this is the main application menu add/remove items as required

Modified: trunk/web2py/applications/helyesiras_webdev/modules/resources/README
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/modules/resources/README	2013-05-07 22:37:37 UTC (rev 714)
+++ trunk/web2py/applications/helyesiras_webdev/modules/resources/README	2013-05-07 22:48:33 UTC (rev 715)
@@ -3,6 +3,7 @@
 hyph_hu_HU.dic 
 Dictionary for hyphenator module (pyhyphen), from http://downloads.sourceforge.net/magyarispell/hyph_hu.zip
 (local origin /usr/local/lib/python2.6/dist-packages/hyphen/hyph_hu_HU.dic)
+The symlink "hu_HU" to it is IMPORTANT to have (PyHyphen1.0-beta downgrade workaround on nytud.ezit.hu)
 
 egybekulon2.grm
 Grammar file for egybekulon2 module




More information about the Hejes-devel mailing list