systemd service

This commit is contained in:
Горлов Максим 2019-08-15 00:04:32 +03:00
parent cc03403fe9
commit de13d91241
2 changed files with 20 additions and 1 deletions

View file

@ -23,7 +23,7 @@ type SMARTctl struct {
device SMARTDevice
}
// NewSMARTctl is NFTables constructor
// NewSMARTctl is smartctl constructor
func NewSMARTctl(json gjson.Result, ch chan<- prometheus.Metric) SMARTctl {
smart := SMARTctl{}
smart.ch = ch

View file

@ -0,0 +1,19 @@
[Unit]
Description=smartctl exporter service
After=network-online.target
[Service]
Type=simple
PIDFile=/run/smartctl_exporter.pid
ExecStart=/usr/bin/smartctl_exporter
User=root
Group=root
SyslogIdentifier=smartctl_exporter
Restart=on-failure
RemainAfterExit=no
RestartSec=100ms
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target