Skip to content

Commit

Permalink
Rearrange rsyslog and logshipper deps in systemd
Browse files Browse the repository at this point in the history
Also, create the fifo on demand, with correct security context.
Finally works.
  • Loading branch information
dividedmind committed Dec 21, 2015
1 parent c677026 commit 98f8385
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions files/default/systemd/logshipper.service
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
[Unit]
Description=Conjur log shipping service
Documentation=https://developer.conjur.net
RequiresOverridable=rsyslog.service
Wants=rsyslog.service
Before=rsyslog.service

[Service]
ExecStartPre=-/bin/rm /var/run/logshipper
ExecStartPre=/bin/mkfifo --context --mode 0460 /var/run/logshipper
ExecStartPre=/bin/chown logshipper /var/run/logshipper
ExecStart=/usr/sbin/logshipper -n /var/run/logshipper
Restart=always
User=logshipper
Group=conjur
PermissionsStartOnly=true

[Install]
WantedBy=rsyslog.target
RequiredBy=rsyslog.service
4 changes: 2 additions & 2 deletions recipes/_install_logshipper_systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
source 'systemd/logshipper.service'
owner 'root'
group 'root'
mode '0755'
mode '0644'
end

bash 'enable and run logshipper' do
code """
systemctl enable logshipper
systemctl start logshipper
systemctl restart rsyslog
"""
end

0 comments on commit 98f8385

Please sign in to comment.