#!/bin/sh # $FreeBSD$ # PROVIDE: strongswan # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # strongswan_enable (bool): Set to NO by default. # Set it to YES to enable strongswan. . /etc/rc.subr name="strongswan" rcvar=strongswan_enable command="%%PREFIX%%/sbin/ipsec" 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"