A very specific Golang interface to the Dark Sky API for my Chrome Extension
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
690 B

5 years ago
5 years ago
5 years ago
  1. [Unit]
  2. Description=Dark Sky Weather API service
  3. ConditionPathExists=/root/go/src/weather-api
  4. After=network.target
  5. [Service]
  6. Type=simple
  7. User=root
  8. Group=root
  9. LimitNOFILE=1024
  10. Environment="DARK_SKY_API_KEY=\"\""
  11. Restart=on-failure
  12. RestartSec=10
  13. WorkingDirectory=/root/go/src/weather-api
  14. ExecStart=/bin/bash -c "/root/go/src/weather-api/weather-api"
  15. # make sure log directory exists and owned by syslog
  16. PermissionsStartOnly=true
  17. ExecStartPre=/bin/mkdir -p /var/log/weatherapi
  18. ExecStartPre=/bin/chown syslog:adm /var/log/weatherapi
  19. ExecStartPre=/bin/chmod 755 /var/log/weatherapi
  20. StandardOutput=syslog
  21. StandardError=syslog
  22. SyslogIdentifier=weatherapi
  23. [Install]
  24. WantedBy=multi-user.target