Created
March 25, 2019 01:47
-
-
Save lrstanley/5ba00076899bc1b563e2e0a0269e8efa to your computer and use it in GitHub Desktop.
example simple systemd file (go sites?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; can go in /etc/systemd/system/mysite.service | |
; make sure to: | |
; $ systemctl enable <app> | |
; $ systemctl start <app> | |
[Unit] | |
Description=mysite | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
;PIDFile=/tmp/mysite.pid | |
ExecStart=/opt/yoursite/yourbinary <args> | |
WorkingDirectory=/opt/yoursite/ | |
LimitNOFILE=4096 | |
User=root | |
Group=root | |
Restart=always | |
RestartSec=10 | |
StartLimitInterval=0 | |
TimeoutStopSec=10s | |
KillMode=mixed | |
KillSignal=SIGQUIT | |
;PrivateDevices=true | |
;ProtectHome=true | |
;ProtectSystem=full | |
;PrivateTmp=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment