Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Infers hostname for "localvm" setting
Browse files Browse the repository at this point in the history
Still checks the config first, but if the "localvm" flag isn't set
there, defaults to the hostname provided by the system. Useful for
simplfying config story between TemplateVMs & AppVMs in Qubes.
  • Loading branch information
Conor Schaefer committed Mar 4, 2020
1 parent 7976e0f commit 89668e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.1

* Infers hostname from system settings, if no config value found.

## 0.1.0

* Initial beta release.
Expand Down
3 changes: 2 additions & 1 deletion sd-rsyslog
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import os
import logging
import configparser
from subprocess import Popen, PIPE
from socket import gethostname

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

0 comments on commit 89668e2

Please sign in to comment.