aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2018-10-02 18:58:37 +0800
committergarga <garga@FreeBSD.org>2018-10-02 18:58:37 +0800
commita6146346937b3218ef18af14cc6eea6ff9bd69c5 (patch)
tree68efa9f6c49f21a1b5c69b2ead23c2759992cc46 /security
parent2376836583093aa441e5acc899de32ae5e61a148 (diff)
downloadfreebsd-ports-gnome-a6146346937b3218ef18af14cc6eea6ff9bd69c5.tar.gz
freebsd-ports-gnome-a6146346937b3218ef18af14cc6eea6ff9bd69c5.tar.zst
freebsd-ports-gnome-a6146346937b3218ef18af14cc6eea6ff9bd69c5.zip
security/strongswan: Fix rc startup script to support rc.conf settings like
_nice, _fib Do not bump version since I'll commit the upgrade to 5.7.1 just after it PR: 211108 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Approved by: maintainer Sponsored by: Rubicon Communications, LLC (Netgate)
Diffstat (limited to 'security')
-rw-r--r--security/strongswan/files/strongswan.in28
1 files changed, 16 insertions, 12 deletions
diff --git a/security/strongswan/files/strongswan.in b/security/strongswan/files/strongswan.in
index 85da87dea437..527fcbf0a68d 100644
--- a/security/strongswan/files/strongswan.in
+++ b/security/strongswan/files/strongswan.in
@@ -7,27 +7,31 @@
# BEFORE: LOGIN
# KEYWORD: shutdown
-command="%%PREFIX%%/sbin/ipsec"
. /etc/rc.subr
-name="strongswan"
-rcvar=${name}_enable
+name=strongswan
+rcvar=strongswan_enable
+
extra_commands="reload statusall"
load_rc_config $name
-start_cmd="strongswan_command start"
-stop_cmd="strongswan_command stop"
-restart_cmd="strongswan_command restart"
-status_cmd="strongswan_command status"
-reload_cmd="strongswan_command reload"
-statusall_cmd="strongswan_command statusall"
+command="%%PREFIX%%/sbin/ipsec"
+start_precmd="strongswan_precmd"
+stop_cmd="strongswan_cmd"
+status_cmd="strongswan_cmd"
+reload_cmd="strongswan_cmd"
+statusall_cmd="strongswan_cmd"
-strongswan_command()
+strongswan_precmd()
{
- $command ${rc_arg}
+ command_args=${rc_arg}
}
-run_rc_command "$1"
+strongswan_cmd()
+{
+ ${command} ${rc_arg}
+}
+run_rc_command "$1"