Initial commit
This commit is contained in:
commit
aa4e110832
69 changed files with 17898 additions and 0 deletions
36
src/wa/server/WAConstants.java
Normal file
36
src/wa/server/WAConstants.java
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package wa.server;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import zutil.osal.OSAbstractionLayer;
|
||||
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_SSL_CERT = "cert/server.crt";
|
||||
public static final String WA_SSL_KEY = "cert/server.key";
|
||||
|
||||
public static final String WA_CONFIG_BOUNDARY = "---- WebAdmin Configuration ----";
|
||||
|
||||
|
||||
static{
|
||||
OSAbstractionLayer os = OSAbstractionLayer.getInstance();
|
||||
|
||||
if(os.getOSType() == OSType.Linux){
|
||||
WA_BASE_CONFIG_PATH = WA_BASE_CONFIG_PATH_LINUX;
|
||||
}
|
||||
else if(os.getOSType() == OSType.Windows){
|
||||
WA_BASE_CONFIG_PATH = WA_BASE_CONFIG_PATH_WINDOWS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static File getConfigFile(String name){
|
||||
return new File(WA_BASE_CONFIG_PATH, name);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue