summaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/main.vala15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/web/main.vala b/src/web/main.vala
index dd354c5..86caea5 100644
--- a/src/web/main.vala
+++ b/src/web/main.vala
@@ -21,9 +21,9 @@ string templatedir;
public static int main(string[] args) {
TlsCertificate? cert = null;
- string certificate;
- string privatekey;
- uint port;
+ string certificate = "";
+ string privatekey = "";
+ uint port = 8080;
try {
db = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database");
@@ -31,8 +31,13 @@ public static int main(string[] args) {
cfg = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config");
templatedir = cfg.get_string("WEB", "filepath");
port = cfg.get_integer("WEB", "port");
- certificate = cfg.get_string("WEB", "cert");
- privatekey = cfg.get_string("WEB", "key");
+
+ try {
+ certificate = cfg.get_string("WEB", "cert");
+ privatekey = cfg.get_string("WEB", "key");
+ } catch(KeyFileError e) {
+ warning("KeyFileError: %s\n", e.message);
+ }
} catch(IOError e) {
error("IOError: %s\n", e.message);
} catch(KeyFileError e) {