Statistics
| Revision:

root / hci / trunk / .metadata / .plugins / org.eclipse.core.resources / .history / 73 / e0535e273f1100101b298e4b78455d2e @ 3

History | View | Annotate | Download (734 Bytes)

1
import com.eneraptor.hci.InternalConfig
2

    
3
class BootStrap {
4

    
5
    def init = { servletContext ->
6
		
7
		// First-run installation
8
		
9
		if(!InternalConfig.count()) {
10
			
11
			System.out.println("[eneraptor-hci] First time run. Installing...");
12
			
13
			// HCI configuration
14
			new InternalConfig(configId:'hci-version', configVal:'0.10.12.26').save()
15
			new InternalConfig(configId:'super-admin', configVal:'admin'     ).save()
16
			new InternalConfig(configId:'super-pass' , configVal:'pass'      ).save()
17
			
18
			// HCI <--> Logic Configuration
19
			new InternalConfig(configId:'logic-ip'   , configVal:'127.0.0.1' ).save()
20
			new InternalConfig(configId:'logic-port' , configVal:'80'        ).save()
21
			
22
		}
23
		
24
    }
25
    def destroy = {
26
    }
27
}