diff --git a/cookbooks/prometheus-exporters/exporter_proxy.rb b/cookbooks/prometheus-exporters/exporter_proxy.rb index 55ffca2..515ad71 100644 --- a/cookbooks/prometheus-exporters/exporter_proxy.rb +++ b/cookbooks/prometheus-exporters/exporter_proxy.rb @@ -28,17 +28,15 @@ remote_file "#{CONFDIR}#{CONF}" do mode '644' end -remote_file '/etc/supervisor/conf.d/exporter_proxy.conf' do +remote_file '/etc/systemd/system/exporter_proxy.service' do user 'root' group 'root' mode '644' - - notifies :restart, 'service[supervisor]' end -service 'supervisor' do - action :nothing +service 'exporter_proxy' do + action [:enable, :start] end # Firewall settings here: diff --git a/cookbooks/prometheus-exporters/files/etc/systemd/system/exporter_proxy.service b/cookbooks/prometheus-exporters/files/etc/systemd/system/exporter_proxy.service new file mode 100644 index 0000000..1fc3c77 --- /dev/null +++ b/cookbooks/prometheus-exporters/files/etc/systemd/system/exporter_proxy.service @@ -0,0 +1,11 @@ +[Unit] +Description=Exporter Proxy + +[Service] +User=root +Group=root +ExecStart=/usr/local/bin/exporter_proxy -config /etc/prometheus_exporters.d/exporter_proxy/config.yml + +[Install] +WantedBy=multi-user.target +