Added a Config page. Currently unreachable.
This commit is contained in:
parent
b115a9cb4f
commit
ee19d84434
11 changed files with 157 additions and 27 deletions
|
|
@ -13,7 +13,7 @@ import wa.server.util.ConfigFileUtil;
|
|||
import zutil.db.DBConnection;
|
||||
import zutil.io.file.FileUtil;
|
||||
|
||||
public class ApacheConfig implements WAServiceConfig {
|
||||
public class ApacheConfig{
|
||||
private static final String APACHE_CONF_FILE = "wa_apache_vhost.conf";
|
||||
private static final String APACHE_MAIN_CONFIG_FILE = "/etc/apache2/apache2.conf";
|
||||
private static final String STATIC_PRE_CONF = "wa/server/plugin/apache/apache_default.config";
|
||||
|
|
@ -26,13 +26,13 @@ public class ApacheConfig implements WAServiceConfig {
|
|||
vhosts = new LinkedList<ApacheConfigVirtualHost>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void read() throws SQLException {
|
||||
DBConnection db = WAConstants.getDB();
|
||||
vhosts = ApacheConfigVirtualHost.load(db, ApacheConfigVirtualHost.class);
|
||||
//vhosts = ApacheConfigVirtualHost.load(db, ApacheConfigVirtualHost.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void save() throws IOException {
|
||||
File file = WAConstants.getConfigFile(APACHE_CONF_FILE);
|
||||
// Update main configuration file
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package wa.server.plugin.apache;
|
||||
|
||||
import wa.server.WAConstants;
|
||||
import wa.server.plugin.WAServiceConfig;
|
||||
import zutil.db.bean.DBBean;
|
||||
import zutil.db.bean.DBBean.DBTable;;
|
||||
import zutil.db.bean.DBBean.DBTable;;import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@DBTable(WAConstants.DB_TABLE_PREFIX+"_apache_vhost")
|
||||
public class ApacheConfigVirtualHost extends DBBean{
|
||||
public class ApacheConfigVirtualHost implements WAServiceConfig{
|
||||
public static final String CONFIG_NAME = "Apache Virtual Host";
|
||||
|
||||
protected String domain;
|
||||
protected String path;
|
||||
protected boolean ssl;
|
||||
|
|
@ -30,4 +34,19 @@ public class ApacheConfigVirtualHost extends DBBean{
|
|||
public void setSSL(boolean ssl) {
|
||||
this.ssl = ssl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return CONFIG_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read() throws SQLException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() throws IOException {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ public class ApacheService implements WAService {
|
|||
|
||||
private ApacheStatus status;
|
||||
private ApacheInstaller installer;
|
||||
private WAServiceConfig[] config = new WAServiceConfig[]{
|
||||
new ApacheConfigVirtualHost()
|
||||
};
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
|
@ -61,6 +64,6 @@ public class ApacheService implements WAService {
|
|||
|
||||
@Override
|
||||
public WAServiceConfig[] getConfigurations() {
|
||||
return new WAServiceConfig[0];
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue