Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change webhook systemd service type to simple #513

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
$webhook_default_branch = 'production'
$webhook_use_mco_ruby = false
$webhook_protected = true
$webhook_background = true
$webhook_github_secret = undef
$webhook_bitbucket_secret = undef
$webhook_discovery_timeout = 10
Expand Down Expand Up @@ -180,13 +179,16 @@
$webhook_service_file = '/etc/init.d/webhook'
$webhook_service_template = 'webhook.init.gentoo.erb'
$webhook_service_file_mode = '0755'
$webhook_background = true
} elsif $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] < '7' {
$webhook_service_file = '/etc/init.d/webhook'
$webhook_service_template = 'webhook.init.erb'
$webhook_service_file_mode = '0755'
$webhook_background = true
} else {
$webhook_service_file = '/etc/systemd/system/webhook.service'
$webhook_service_template = 'webhook.service.erb'
$webhook_service_file_mode = '0644'
$webhook_background = false
}
}
5 changes: 1 addition & 4 deletions templates/webhook.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ Description=R10K Webhook Service
After=syslog.target network.target

[Service]
Type=forking
Type=simple
EnvironmentFile=-/etc/sysconfig/webhook
RuntimeDirectory=webhook
User=<%= @user %>
PIDFile=/var/run/webhook/webhook.pid
TimeoutStartSec=90
TimeoutStopSec=30
RestartSec=10000

ExecStart=/usr/local/bin/webhook

KillMode=process

StandardOutput=syslog

[Install]
Expand Down