sbrudenell / sb8200_exporter

A prometheus exporter for the Arris SB8200
MIT License
4 stars 9 forks source link

Starting as a service un Ubuntu #7

Closed cypherstream closed 3 years ago

cypherstream commented 3 years ago

I wanted to share how I have this start as a service in ubuntu cd /etc/systemd/system sudo nano sb8200_exporter.service

[Unit]
Description=sb8200_exporter
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=sauerk
ExecStart=/usr/local/bin/sb8200_exporter

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload to enable the service at boot: sudo systemctl enable sb8200_exporter.service

to start the service now sudo systemctl start sb8200_exporter

To check the status of the service sudo systemctl status sb8200_exporter.service

â sb8200_exporter.service - sb8200_exporter
     Loaded: loaded (/etc/systemd/system/sb8200_exporter.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-11-06 17:45:16 UTC; 3min 59s ago
   Main PID: 2064493 (sb8200_exporter)
      Tasks: 1 (limit: 2204)
     Memory: 24.6M
     CGroup: /system.slice/sb8200_exporter.service
             ââ2064493 /usr/bin/python3 /usr/local/bin/sb8200_exporter

Nov 06 17:45:16 grafana systemd[1]: Started sb8200_exporter.

Your welcome!

sbrudenell commented 3 years ago

Thanks for the info!