mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
Add strongswan (#1330)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6429 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
34
package/strongswan/files/ipsec.button
Normal file
34
package/strongswan/files/ipsec.button
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
# snarf the code that loads the config values
|
||||
# since we also load the functions, might as well save the shell calls
|
||||
. /etc/init.d/ipsec
|
||||
|
||||
[ -n "$IPSEC_RESET_BUTTON" -a "$BUTTON" = "$IPSEC_RESET_BUTTON" ] || exit
|
||||
|
||||
if [ ! -e /var/run/pluto.pid ] ; then
|
||||
|
||||
[ "$ACTION" = "pressed" ] && start
|
||||
|
||||
else
|
||||
|
||||
if [ "$ACTION" = "pressed" ] ; then
|
||||
|
||||
stop
|
||||
|
||||
elif [ "$ACTION" = "released" ] ; then
|
||||
|
||||
while [ -e /var/run/pluto.pid ] ; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while ps auxww | grep ipsec | grep -v grep ; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
start
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user