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.

30 lines
714 B

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. Environment="GIN_MODE=dev"
  12. Restart=on-failure
  13. RestartSec=10
  14. WorkingDirectory=/root/go/src/weather-api
  15. ExecStart=/bin/bash -c "/root/go/src/weather-api/weather-api"
  16. # make sure log directory exists and owned by syslog
  17. PermissionsStartOnly=true
  18. ExecStartPre=/bin/mkdir -p /var/log/weatherapi
  19. ExecStartPre=/bin/chown syslog:adm /var/log/weatherapi
  20. ExecStartPre=/bin/chmod 755 /var/log/weatherapi
  21. StandardOutput=syslog
  22. StandardError=syslog
  23. SyslogIdentifier=weatherapi
  24. [Install]
  25. WantedBy=multi-user.target