summaryrefslogtreecommitdiffstats
path: root/src/web/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/main.vala')
-rw-r--r--src/web/main.vala30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/web/main.vala b/src/web/main.vala
index 2043df0..761bba9 100644
--- a/src/web/main.vala
+++ b/src/web/main.vala
@@ -19,6 +19,7 @@ public PGP pgp;
public Config cfg;
public AudioPlayer audio;
string templatedir;
+string? shortname;
public static int main(string[] args) {
Intl.setlocale(LocaleCategory.ALL, "");
@@ -37,13 +38,6 @@ public static int main(string[] args) {
var datapath = cfg.get_string("GENERAL", "datapath");
templatedir = Path.build_filename(datapath, "templates");
port = cfg.get_integer("WEB", "port");
-
- try {
- certificate = cfg.get_string("WEB", "cert");
- privatekey = cfg.get_string("WEB", "key");
- } catch(KeyFileError e) {
- warning(_("KeyFile Error: %s\n"), e.message);
- }
} catch(IOError e) {
error(_("IO Error: %s\n"), e.message);
} catch(KeyFileError e) {
@@ -52,6 +46,28 @@ public static int main(string[] args) {
error(_("DBus Error: %s\n"), e.message);
}
+ try {
+ certificate = cfg.get_string("WEB", "cert");
+ privatekey = cfg.get_string("WEB", "key");
+ } catch(KeyFileError e) {
+ warning(_("KeyFile Error: %s\n"), e.message);
+ } catch(IOError e) {
+ error(_("IO Error: %s\n"), e.message);
+ } catch(DBusError e) {
+ error(_("DBus Error: %s\n"), e.message);
+ }
+
+ try {
+ shortname = cfg.get_string("GENERAL", "shortname");
+ } catch(KeyFileError e) {
+ shortname = "";
+ warning(_("KeyFile Error: %s\n"), e.message);
+ } catch(IOError e) {
+ error(_("IO Error: %s\n"), e.message);
+ } catch(DBusError e) {
+ error(_("DBus Error: %s\n"), e.message);
+ }
+
stdout.printf(_("Web Server Port: %u\n"), port);
stdout.printf(_("TLS certificate: %s\n"), certificate);
stdout.printf(_("TLS private key: %s\n"), privatekey);