Created
January 15, 2018 06:49
-
-
Save KireinaHoro/96c2738fded774dd6d8a87efc10cab88 to your computer and use it in GitHub Desktop.
service file for aria2
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
#!/sbin/openrc-run | |
# Copyright 1999-2018 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
depend() { | |
need net localmount | |
after bootmisc | |
} | |
start() { | |
ebegin "Starting Aria2c" | |
[ -e /etc/aria2.daemon ] || touch /etc/aria2.daemon | |
start-stop-daemon --start --background --make-pidfile --pidfile /var/run/aria2.pid \ | |
--exec /usr/bin/aria2c -- --console-log-level=warn --enable-rpc --rpc-listen-all \ | |
--conf-path=/etc/aria2.daemon | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping Aria2c" | |
start-stop-daemon --stop --exec /usr/bin/aria2c --pidfile /var/run/aria2.pid | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment