Skip to content

Instantly share code, notes, and snippets.

@agrif
Last active July 21, 2019 02:06
Show Gist options
  • Save agrif/71bac7041331236f157c9a8e3c365aef to your computer and use it in GitHub Desktop.
Save agrif/71bac7041331236f157c9a8e3c365aef to your computer and use it in GitHub Desktop.
goestools example systemd unit files
  • Add files to /etc/systemd/system/
  • Edit as needed (change paths!)
  • Run:
    sudo systemctl start goesrecv
    sudo systemctl start goesproc
    
  • Verify they're running:
    sudo systemctl status goesrecv
    sudo systemctl status goesproc
    
  • Enable at boot:
    sudo systemctl enable goesrecv
    sudo systemctl enable goesproc
    
[Unit]
Description=Process GOES packets.
Requires=goesrecv.service
After=goesrecv.service
[Service]
Type=simple
ExecStart=/usr/local/bin/goesproc -c /home/agrif/goesproc-goesr.conf -m packet --subscribe tcp://127.0.0.1:5004
Restart=on-failure
RestartSec=30
User=agrif
WorkingDirectory=/home/agrif/received
StandardOutput=null
StandardError=journal
[Install]
WantedBy=multi-user.target
[Unit]
Description=Receive GOES packets.
[Service]
Type=simple
ExecStart=/usr/local/bin/goesrecv -c /home/agrif/goesrecv.conf
Restart=on-failure
RestartSec=30
User=agrif
StandardOutput=null
StandardError=journal
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment