summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-01-23 19:19:58 +0100
committerSimon Rettberg2015-01-23 19:19:58 +0100
commit2eb5cea8578c2884c6f30fa379212bbfc1554bed (patch)
tree12d4eb781782e07e41b084444a2185a978e90c98 /src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java
parentPimp my boot menu (diff)
downloadtmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.gz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.xz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.zip
Stuff
Diffstat (limited to 'src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java')
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java b/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java
index e3a06bf..6324657 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/LighttpdHttps.java
@@ -8,6 +8,10 @@ import org.openslx.taskmanager.api.AbstractTask;
import com.google.gson.annotations.Expose;
+/**
+ * Task for enabling or disabling https support in lighttpd.
+ * Can greate a self-signed cert on the fly, or use a supplied one.
+ */
public class LighttpdHttps extends AbstractTask
{
@@ -33,9 +37,9 @@ public class LighttpdHttps extends AbstractTask
@Override
protected boolean execute()
{
- if ( this.importcert != null && this.importkey != null )
+ if ( this.importcert != null && this.importkey != null && !this.importcert.isEmpty() && !this.importkey.isEmpty() )
return createFromInput();
- if ( this.proxyip != null )
+ if ( this.proxyip != null && !this.proxyip.isEmpty() )
return createRandom();
return disableHttps();
}
@@ -99,7 +103,7 @@ public class LighttpdHttps extends AbstractTask
{
int ret = Exec.sync( "sudo", "-n", "-u", "root", "/opt/taskmanager/scripts/install-https", "--disable" );
if ( ret != 0 ) {
- status.error = "import exited with code " + ret;
+ status.error = "disable exited with code " + ret;
return false;
}
return true;