1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/www/aria2/files/aria2.in
Ryan Steinmetz d684655ef6 - Add rc script for aria
Approved by:	sunpoet@ (maintainer)
2014-11-07 14:23:50 +00:00

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"