Skip to content

Commit 6e0dc3f

Browse files
authored
Merge pull request #16 from freedomofpress/infer-hostname
Infers hostname for "localvm" setting
2 parents 7976e0f + 89668e2 commit 6e0dc3f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.1.1

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.1
4+
5+
* Infers hostname from system settings, if no config value found.
6+
37
## 0.1.0
48

59
* Initial beta release.

sd-rsyslog

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import os
3030
import logging
3131
import configparser
3232
from subprocess import Popen, PIPE
33+
from socket import gethostname
3334

3435
# Global definitions specific to your plugin
3536
process = None
@@ -81,7 +82,7 @@ def onInit():
8182
config = configparser.ConfigParser()
8283
config.read('/etc/sd-rsyslog.conf')
8384
logvmname = config['sd-rsyslog']['remotevm']
84-
localvmname = config['sd-rsyslog']['localvm']
85+
localvmname = config['sd-rsyslog'].get('localvm', gethostname())
8586
process = Popen(
8687
["/usr/lib/qubes/qrexec-client-vm", logvmname, "securedrop.Log"],
8788
stdin=PIPE,

0 commit comments

Comments
 (0)