Skip to content

Instantly share code, notes, and snippets.

@KireinaHoro
Created January 15, 2018 06:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KireinaHoro/96c2738fded774dd6d8a87efc10cab88 to your computer and use it in GitHub Desktop.
Save KireinaHoro/96c2738fded774dd6d8a87efc10cab88 to your computer and use it in GitHub Desktop.
service file for aria2
#!/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