moved templates to WeContent folder
This commit is contained in:
parent
1d34162bb5
commit
29def452b6
16 changed files with 11465 additions and 29 deletions
|
|
@ -8,10 +8,12 @@ import zutil.osal.OSAbstractionLayer.OSType;
|
|||
public class WAConstants {
|
||||
public static final String DB_TABLE_PREFIX = "wa";
|
||||
|
||||
public static String WA_BASE_CONFIG_PATH;
|
||||
public static final String WA_BASE_CONFIG_PATH_LINUX = "/etc/webadmin";
|
||||
public static final String WA_BASE_CONFIG_PATH_WINDOWS = ".";
|
||||
|
||||
|
||||
public static final String WA_ROOT_PATH_LINUX = "/";
|
||||
public static final String WA_ROOT_PATH_WINDOWS = "C:\\webadmin\\";
|
||||
public static final String WA_BASE_CONFIG_PATH = "etc/webadmin/";
|
||||
private static final File configPath;
|
||||
|
||||
public static final String WA_SSL_CERT = "cert/server.crt";
|
||||
public static final String WA_SSL_KEY = "cert/server.key";
|
||||
|
||||
|
|
@ -22,15 +24,18 @@ public class WAConstants {
|
|||
OSAbstractionLayer os = OSAbstractionLayer.getInstance();
|
||||
|
||||
if(os.getOSType() == OSType.Linux){
|
||||
WA_BASE_CONFIG_PATH = WA_BASE_CONFIG_PATH_LINUX;
|
||||
configPath = new File(WA_ROOT_PATH_LINUX + WA_BASE_CONFIG_PATH);
|
||||
}
|
||||
else if(os.getOSType() == OSType.Windows){
|
||||
WA_BASE_CONFIG_PATH = WA_BASE_CONFIG_PATH_WINDOWS;
|
||||
configPath = new File(WA_ROOT_PATH_WINDOWS + WA_BASE_CONFIG_PATH);
|
||||
}
|
||||
else {
|
||||
configPath = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static File getConfigFile(String name){
|
||||
return new File(WA_BASE_CONFIG_PATH, name);
|
||||
return new File(configPath, name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue