mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
d684655ef6
Approved by: sunpoet@ (maintainer)
37 lines
692 B
Bash
37 lines
692 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: aria2
|
|
# REQUIRE: NETWORKING
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable aria2:
|
|
#
|
|
# aria2_enable="YES"
|
|
#
|
|
# You can define flags for aria2 running. See aria2c(1) for details.
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=aria2
|
|
rcvar=aria2_enable
|
|
|
|
command=%%PREFIX%%/bin/aria2c
|
|
|
|
# read configuration and set defaults
|
|
load_rc_config $name
|
|
aria2_enable=${aria2_enable:-"NO"}
|
|
aria2_config=${aria2_config:-"%%PREFIX%%/etc/aria2.conf"}
|
|
aria2_flags=${aria2_flags:-""}
|
|
aria2_user=${aria2_user:-"nobody"}
|
|
aria2_group=${aria2_group:-"nobody"}
|
|
|
|
required_files=${aria2_config}
|
|
command_args="-D --conf-path=${aria2_config} ${aria2_flags}"
|
|
|
|
run_rc_command "$1"
|