Changeset 1653 for trunk/grails-app/controllers/generic
- Timestamp:
- Mar 18, 2011, 4:06:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/generic/installation/SetupController.groovy
r1651 r1653 59 59 println config.dataSource.dump() 60 60 61 def configPath = new File("/etc/${meta(name: 'app.name')}/")62 if (configPath.exists()) {63 println "path exists"64 } else {65 println "path does not exist"66 }67 68 if (configPath.canWrite()) {69 println "path is writable"70 } else {71 println "path is not writable"72 }73 74 def configFile = new File("/etc/${meta(name: 'app.name')}/${grails.util.GrailsUtil.environment}.properties")75 if (configFile.exists()) {76 println "file exists"77 } else {78 println "file does not exist"79 }80 81 82 61 // define variables in the flow scope which is availabe 83 62 // throughout the complete webflow also have a look at … … 100 79 // define famfamfam icons 101 80 flow.icons = [ 102 'true': 'accept',81 true : 'accept', 103 82 false : 'cancel' 104 ]105 106 // add configuration information to the flow scope107 flow.configInfo = [108 path : configPath,109 pathExists : configPath.exists(),110 pathCanRead : configPath.canRead(),111 pathCanWrite : configPath.canWrite(),112 pathSummary : (configPath.exists() && configPath.canRead() && configPath.canWrite()),113 file : configFile,114 fileExists : configFile.exists(),115 fileCanRead : configFile.canRead(),116 fileCanWrite : configFile.canWrite(),117 fileSummary : (configFile.exists() && configFile.canRead() && configFile.canWrite())118 83 ] 119 84 … … 146 111 147 112 flow.page = 1 113 114 // config 115 def configPath = new File("/etc/${meta(name: 'app.name')}/") 116 def configFile = new File("/etc/${meta(name: 'app.name')}/${grails.util.GrailsUtil.environment}.properties") 117 118 // add configuration information to the flow scope 119 flow.configInfo = [ 120 path: configPath, 121 pathExists: configPath.exists(), 122 pathCanRead: configPath.canRead(), 123 pathCanWrite: configPath.canWrite(), 124 pathSummary: (configPath.exists() && configPath.canRead() && configPath.canWrite()), 125 file: configFile, 126 fileExists: configFile.exists(), 127 fileCanRead: configFile.canRead(), 128 fileCanWrite: configFile.canWrite(), 129 fileSummary: (configFile.exists() && configFile.canRead() && configFile.canWrite()) 130 ] 131 148 132 success() 149 133 }
Note: See TracChangeset
for help on using the changeset viewer.