blob: 6f3d6d2953cb59f3cf9896e47712b33ecd48ff90 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/sh
# Created by: l33tname <sirl33tname@gmail.com>
#
# PROVIDE: gollum
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# gollum_enable (bool): Set to NO by default.
# Set it to YES to enable.
#
# gollum_path Set it to the location where
# your git repo is located.
#
# gollum_user User to run command as
# Default is root
#
# gollum_ip Set the IP address gollum listens on
# Default is "0.0.0.0"
#
# gollum_port Set the IP address gollum listens on
# Default is "80"
. /etc/rc.subr
# setup enviroment
export PATH=$PATH:%%PREFIX%%/bin
. /etc/rc.subr
name="gollum"
rcvar="${name}_enable"
load_rc_config $name
: ${gollum_enable:=NO}
: ${gollum_path:=%%PREFIX%%/www/gollum}
: ${gollum_user:=root}
: ${gollum_ip:=0.0.0.0}
: ${gollum_port:=80}
pidfile=/var/run/${name}.pid
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f gollum --host ${gollum_ip} --port ${gollum_port} --live-preview ${gollum_path}"
load_rc_config $name
run_rc_command "$1"
|