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
717 B

[Unit]
Description=Dark Sky Weather API service
ConditionPathExists=/root/go/src/weather-api
After=network.target
[Service]
Type=simple
User=root
Group=root
LimitNOFILE=1024
Environment="DARK_SKY_API_KEY="
Environment="GIN_MODE=release"
Restart=on-failure
RestartSec=10
WorkingDirectory=/root/go/src/weather-api
ExecStart=/bin/bash -c "/root/go/src/weather-api/weather-api"
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/weatherapi
ExecStartPre=/bin/chown syslog:adm /var/log/weatherapi
ExecStartPre=/bin/chmod 755 /var/log/weatherapi
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=weatherapi
[Install]
WantedBy=multi-user.target