Skip to content

Commit

Permalink
Makes sure that sdlog.conf file is in sd-whonix
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Feb 18, 2020
1 parent c086fec commit 441aeb8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dom0/sd-clean-all.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ sd-cleanup-whonix-gw-15:
cmd.run:
- names:
- qvm-run whonix-gw-15 'sudo rm -f /etc/rsyslog.d/sdlog.conf'
- qvm-run whonix-gw-15 'sudo systemctl restart rsyslog'
- qvm-run whonix-gw-15 'sudo rm -f /etc/apt/sources.list.d/securedrop_workstation.list'
- qvm-run whonix-gw-15 'sudo apt remove -y securedrop-log'
- qvm-run whonix-gw-15 'sudo systemctl restart rsyslog'
- qvm-run whonix-gw-15 'sudo apt-key del 4ED79CC3362D7D12837046024A3BE4A92211B03C'



remove-dom0-sdw-config-files:
file.absent:
Expand Down
7 changes: 7 additions & 0 deletions dom0/sd-whonix-rsyslog-enable.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ sd-rsyslog-for-sd-whonix:
- context:
vmname: sd-whonix

sd-rsyslog-sdlog-conf-for-sd-whonix:
file.managed:
- name: /rw/config/sdlog.conf
- source: "salt://sdlog.conf"

sd-rc-enable-logging:
file.blockreplace:
Expand All @@ -23,6 +27,9 @@ sd-rc-enable-logging:
- content: |
# Add sd-rsyslog.conf file for syslog
ln -sf /rw/config/sd-rsyslog.conf /etc/sd-rsyslog.conf
if [ ! -f /etc/rsyslog.d/sdlog.conf ]; then
ln -sf /rw/config/sdlog.conf /etc/rsyslog.d/sdlog.conf
fi
systemctl restart rsyslog
cmd.run:
- name: ln -sf /rw/config/sd-rsyslog.conf /etc/sd-rsyslog.conf && systemctl restart rsyslog
Expand Down
4 changes: 4 additions & 0 deletions dom0/sdlog.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module(load="omprog")
action(type="omprog"
binary="/usr/sbin/sd-rsyslog"
template="RSYSLOG_TraditionalFileFormat")

0 comments on commit 441aeb8

Please sign in to comment.