Skip to content

Commit

Permalink
Start daed when daed-as-default enable
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkoG committed Nov 26, 2023
1 parent a667530 commit b167e7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions modules/daed-as-default/files/etc/hotplug.d/iface/99-daed
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

echo "iface $INTERFACE $ACTION detected..."

[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {

sleep 3

# check if daed is running, use ps
if ps | grep -v grep | grep -q daed; then
logger "daed is running"
else
if [ ! -f /root/.daed_first_boot ]; then
logger "First boot detected, starting daed..."

/etc/init.d/daed start

touch /root/.daed_first_boot
else
logger "Not first boot, daed start according to config"
fi
fi
}
1 change: 1 addition & 0 deletions modules/daed-as-default/files/etc/uci-defaults/99-daed
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
uci del dhcp.@dnsmasq[0].dns_redirect
uci set daed.config.enabled='1'
uci commit

0 comments on commit b167e7f

Please sign in to comment.