#!/bin/sh
# Start or stop strongswan
# $FreeBSD$

# PROVIDE: strongswan
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

command="/usr/local/sbin/ipsec"
. /etc/rc.subr

name="strongswan"
rcvar=${name}_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"


strongswan_command()
{
	$command ${rc_arg}
}

run_rc_command "$1"

