Skip to content

Instantly share code, notes, and snippets.

@nhooyr
Created December 7, 2016 22:39
Show Gist options
  • Select an option

  • Save nhooyr/78a4add5ef68ecdd7010cefe959a5a70 to your computer and use it in GitHub Desktop.

Select an option

Save nhooyr/78a4add5ef68ecdd7010cefe959a5a70 to your computer and use it in GitHub Desktop.
systemd.services = {
serveHTTP = {
description = "serveHTTP";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "1";
StartLimitInterval = "0";
PrivateDevices = true;
NoNewPrivileges = true;
ExecStart = "/root/code/gopath/bin/serveHTTP -h1=localhost:8080 -h2=localhost:8081";
WorkingDirectory = "/root/code/gopath/src/github.com/nhooyr/avonDieselEmission";
ProtectSystem = "full";
RestrictAddressFamilies = "AF_INET AF_INET6";
};
};
avonDieselEmission = {
description = "Avon Diesel Emission Website";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "1";
StartLimitInterval = "0";
PrivateDevices = true;
NoNewPrivileges = true;
ExecStart = "/root/code/gopath/bin/serveHTTP -h1=localhost:8082 -h2=localhost:8083";
WorkingDirectory = "/root/code/gopath/src/github.com/nhooyr/avonDieselEmission";
ProtectSystem = "full";
RestrictAddressFamilies = "AF_INET AF_INET6";
};
};
radioGraydon = {
description = "radioGraydon";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "1";
StartLimitInterval = "0";
PrivateDevices = true;
NoNewPrivileges = true;
ExecStart = "/root/code/gopath/bin/radioGraydon -h1=localhost:8084 -h2=localhost:8085";
ProtectSystem = "full";
RestrictAddressFamilies = "AF_INET AF_INET6";
};
};
redirectHTTP = {
description = "redirect HTTP to HTTPS";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "1";
StartLimitInterval = "0";
PrivateDevices = true;
NoNewPrivileges = true;
ExecStart = "/root/code/gopath/bin/redirectHTTP";
ProtectSystem = "full";
RestrictAddressFamilies = "AF_INET AF_INET6";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment