1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 04:44:10 +02:00
openwrt-packages/net/libreswan/files/etc/hotplug.d/iface/89-libreswan
Jaymin Patel 52af24ff56 libreswan: uci configuration support
Add libreswan UCI configuration and hotplug support

Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
2023-10-30 23:44:39 +05:30

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