forked from cyclaero/ipdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeod.rc
41 lines (33 loc) · 998 Bytes
/
geod.rc
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
#!/bin/sh
# FreeBSD rc-script for auto-starting/stopping the geod daemon
#
# Created by Dr. Rolf Jansen on 2016-07-15.
# Copyright (c) 2016 projectstore.net. All rights reserved.
#
# PROVIDE: geod
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the geod daemon:
# geod_enable="YES"
#
# Don't forget to specify the country codes that are allowed '-a ...' XOR denied '-d ...'
# geod_flags="-a DE:BR:US"
#
# If the consolidated IPv4 ranges are not in /usr/local/etc/ipdb/IPRanges/ipcc.bst
# then specify the that file by the '-r bstfile' option in geod_flags
#
# Don't use spaces in the following path argumment:
# geod_pidfile="/var/run/geod.pid"
. /etc/rc.subr
name=geod
rcvar=geod_enable
load_rc_config $name
: ${geod_enable:="NO"}
: ${geod_pidfile:="/var/run/geod.pid"}
pidfile="${geod_pidfile}"
if [ "$pidfile" != "/var/run/geod.pid" ]; then
geod_flags="${geod_flags} -p $pidfile"
fi
command="/usr/local/bin/geod"
command_args=""
run_rc_command "$1"