mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 10:38:21 +04:00
Add libreswan UCI configuration and hotplug support Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
12 lines
352 B
Bash
12 lines
352 B
Bash
#!/bin/sh
|
|
|
|
[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
|
|
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
|
|
|
|
/etc/init.d/ipsec running || exit 0
|
|
uci show libreswan | grep -i "='$INTERFACE'$" || exit 0
|
|
|
|
logger -t libreswan "Restart libreswan due to $ACTION of $INTERFACE ($DEVICE)"
|
|
|
|
/etc/init.d/ipsec restart
|