summaryrefslogtreecommitdiff
path: root/www/apt-cacher-ng/files/apt_cacher_ng.in
blob: ed186b3de1478bbcc8237828a393e7b8a8c637a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

# PROVIDE: apt_cacher_ng
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# apt_cacher_ng_enable (bool):	Set to NO by default.
#				Set it to YES to enable apt-cacher-ng.
# apt_cacher_ng_user (string):	User name to run the proxy with default=proxy.

. /etc/rc.subr

name=apt_cacher_ng
desc="apt-cacher-ng http/s proxy daemon"
rcvar=apt_cacher_ng_enable

load_rc_config $name

: ${apt_cacher_ng_enable:=NO}
: ${apt_cacher_ng_user:=proxy}

command=%%PREFIX%%/sbin/apt-cacher-ng
command_args="-c %%PREFIX%%/etc/apt-cacher-ng"

run_rc_command "$1"