Permalink
Browse files

Adds yet another installation logic stage

git-svn-id: svn://cherokee-project.com/wizards2@6798 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent a6a7fe9 commit 2d16875e4d44d4ba3820926411e26053555ef054 @alobbs alobbs committed Aug 9, 2011
Showing with 21 additions and 7 deletions.
  1. +3 −0 Wizard2.py
  2. +2 −1 cherokee-wizard
  3. +11 −6 templates/PHP.py
  4. +5 −0 wizards/02-Content Management Systems/wordpress.py
View
@@ -67,6 +67,9 @@ def Check_PostUnpack (self):
def Configure_Cherokee (self):
return []
+ def Configure_Cherokee_PostApply (self):
+ return []
+
#
# Protected
#
View
@@ -57,7 +57,8 @@ def install (wizard_path, params):
installer.Download,
installer.Unpack,
installer.Check_PostUnpack,
- installer.Configure_Cherokee):
+ installer.Configure_Cherokee,
+ installer.Configure_Cherokee_PostApply):
errors = phase()
if errors:
View
@@ -84,22 +84,27 @@ def Configure_Cherokee (self):
if errors: return errors
# Collect substitutions
- props = cfg_get_surrounding_repls ('pre_rule', self.php.rule)
- props.update (self.__dict__)
+ self.cfg_replacements = cfg_get_surrounding_repls ('pre_rule', self.php.rule)
+ self.cfg_replacements.update (self.__dict__)
# Wordpress
if self.type == 'directory':
# Apply the configuration
- config = self._config_directory %(props)
+ config = self._config_directory %(self.cfg_replacements)
CTK.cfg.apply_chunk (config)
+ # Post-Apply hook
+ errors = self.Configure_Cherokee_PostApply ()
+ if errors: return errors
+
elif self.type == 'vserver':
# Apply the configuration
- config = self._config_vserver %(props)
+ config = self._config_vserver %(self.cfg_replacements)
CTK.cfg.apply_chunk (config)
- # Static files
- vserver.Add_Usual_Static_Files (props['pre_rule_plus1'])
+ # Post-Apply hook
+ errors = self.Configure_Cherokee_PostApply ()
+ if errors: return errors
# Normalize rules
CTK.cfg.normalize ('vserver!%s!rule'%(self.vserver_num))
@@ -23,6 +23,7 @@
#
import CTK
+import vserver
import Wizard2
import Wizard2_GUI
@@ -124,6 +125,10 @@ def _Handle_Unpacking (self):
def Check_PostUnpack (self):
return self._Check_File_Exists ('wp-comments-post.php')
+ def Configure_Cherokee_PostApply (self):
+ vserver.Add_Usual_Static_Files (self.cfg_replacements['pre_rule_plus1'])
+
+
#
# GUI
#

0 comments on commit 2d16875

Please sign in to comment.