From 0174f5578fd28a78c48e99e1730fdae27c0fdb1b Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Sat, 16 Feb 2013 00:18:10 -0500 Subject: Adding packages to pcr --- pcr/openswan/openswan.rc.d | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 pcr/openswan/openswan.rc.d (limited to 'pcr/openswan/openswan.rc.d') diff --git a/pcr/openswan/openswan.rc.d b/pcr/openswan/openswan.rc.d new file mode 100755 index 000000000..30bd0d56e --- /dev/null +++ b/pcr/openswan/openswan.rc.d @@ -0,0 +1,43 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting Openswan IPsec" + /etc/rc.d/ipsec --start + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + add_daemon openswan + fi + ;; + stop) + stat_busy "Stopping Openswan IPsec" + /etc/rc.d/ipsec --stop + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + rm_daemon openswan + fi + ;; + restart) + stat_busy "Restarting Openswan IPsec" + /etc/rc.d/ipsec --restart + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + add_daemon openswan + fi + ;; + status) + /etc/rc.d/ipsec --status + ;; + *) + echo "usage: $0 {start|stop|restart|status}" +esac + -- cgit v1.2.3-2-g168b