[Unit] Description=HashiCorp Nomad Documentation=https://nomadproject.io/docs/ Wants=network-online.target After=network-online.target ConditionFileNotEmpty=/opt/nomad/config/nomad.hcl [Service] Type=simple User=root Group=root EnvironmentFile=-/opt/nomad/config/nomad.env Environment="AWS_SHARED_CREDENTIALS_FILE=/root/aws/credentials" ExecReload=/bin/kill -HUP $MAINPID ExecStart=/usr/bin/nomad agent -config /opt/nomad/config KillMode=process KillSignal=SIGINT LimitNOFILE=65536 LimitNPROC=infinity Restart=on-failure TimeoutSec=300s RestartSec=2 ## Configure unit start rate limiting. Units which are started more than ## *burst* times within an *interval* time span are not permitted to start any ## more. Use `StartLimitIntervalSec` or `StartLimitInterval` (depending on ## systemd version) to configure the checking interval and `StartLimitBurst` ## to configure how many starts per interval are allowed. The values in the ## commented lines are defaults. # StartLimitBurst = 5 ## StartLimitIntervalSec is used for systemd versions >= 230 # StartLimitIntervalSec = 10s ## StartLimitInterval is used for systemd versions < 230 # StartLimitInterval = 10s TasksMax=infinity OOMScoreAdjust=-1000 [Install] WantedBy=multi-user.target