mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-17 04:44:10 +02:00
![Jaymin Patel](/assets/img/avatar_default.png)
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
|