diff options
author | root <root@rshg054.dnsready.net> | 2013-02-16 00:07:09 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-02-16 00:07:09 -0800 |
commit | 4a4f6be8604aa35bdc81ae29d86b07dc8aea0c5c (patch) | |
tree | 41f9694a761d6e5637f15f9f9241e5b84cd8897b /pcr/openswan/openswan.rc.d | |
parent | 067830244f6b16cb094a59e5ca8fa262bd66a2ec (diff) |
Sat Feb 16 00:07:08 PST 2013
Diffstat (limited to 'pcr/openswan/openswan.rc.d')
-rwxr-xr-x | pcr/openswan/openswan.rc.d | 43 |
1 files changed, 43 insertions, 0 deletions
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 + |