blob: 33a020e9da56f23b072d51f1f16bfb98755eb6c4 (
plain) (
blame)
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
|
#!/bin/sh
#
# motsognir.sh for rc.d usage (c) 2013-2014 Mateusz Viste.
# $Id$
# $FreeBSD$
#
# PROVIDE: motsognir
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# motsognir_enable (bool): Set to NO by default.
# Set it to YES to enable motsognir.
# motsognir_config (path): Set to %%PREFIX%%/etc/motsognir.conf
# by default.
. /etc/rc.subr
name=motsognir
rcvar=motsognir_enable
load_rc_config $name
: ${motsognir_enable:="NO"}
: ${motsognir_config="%%PREFIX%%/etc/motsognir.conf"}
command=%%PREFIX%%/bin/${name}
command_args="--config $motsognir_config"
run_rc_command "$1"
|