Created
November 5, 2018 11:48
-
-
Save rraallvv/ff2e4b8eea5a532fb8b77a99d6366a3f to your computer and use it in GitHub Desktop.
curl service unit
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
[Unit] | |
Description=CURL daemon | |
After=network.target | |
[Service] | |
User=myuser | |
Group=myuser | |
#CPUQuota= | |
#MemoryLimit= | |
#IOReadIOPSMax= | |
#IOWriteIOPSMax= | |
ExecStart=/usr/bin/curl --limit-rate 2M -L -O -C - https://example.com/somefile | |
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/curl | |
WorkingDirectory=/home/myuser | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment