diff --git a/build/vanagon/components/app.rb b/build/vanagon/components/app.rb index 99c8047..b21fd5b 100644 --- a/build/vanagon/components/app.rb +++ b/build/vanagon/components/app.rb @@ -52,5 +52,7 @@ pkg.add_postinstall_action(%w[install upgrade], 'cd /opt/voxpupuli/webhook && bin/postinst.sh') + pkg.add_postinstall_action('install', 'systemctl enable puppet-webhook puppet-webhook-app puppet-webhook-sidekiq && systemctl restart puppet-webhook') + pkg.add_postremove_action('removal', 'rm -rf /opt/voxpupuli/webhook') end diff --git a/resources/puppet-webhook-sidekiq.service b/resources/puppet-webhook-sidekiq.service index eb0f52f..e72a207 100644 --- a/resources/puppet-webhook-sidekiq.service +++ b/resources/puppet-webhook-sidekiq.service @@ -7,7 +7,7 @@ After=puppet-webhook.service EnvironmentFile=-/etc/sysconfig/puppet-webhook EnvironmentFile=-/etc/default/puppet-webhook WorkingDirectory=/opt/voxpupuli/webhook -ExecStart=/opt/voxpupuli/webhook/bin/bundle exec sidekiq -C config/sidekiq.yml -r $WorkingDirectory/config/environment.rb +ExecStart=/opt/voxpupuli/webhook/bin/bundle exec sidekiq -C config/sidekiq.yml -r ${WORKDIR}/config/environment.rb ExecReload=/bin/kill -HUP $PID KillMode=process