From 095ddf7669a05b52839ccbfd2c324de718241747 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 3 Oct 2016 23:43:44 +0200 Subject: examples: add example of a DHCP server As usual, by multiplying directories - "dhcpd_eth0", "dhcpd_wlan1" you can run many servers on different interfaces. Signed-off-by: Denys Vlasenko --- examples/var_service/dhcpd_if/run | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 examples/var_service/dhcpd_if/run (limited to 'examples/var_service/dhcpd_if/run') diff --git a/examples/var_service/dhcpd_if/run b/examples/var_service/dhcpd_if/run new file mode 100755 index 000000000..de85dece0 --- /dev/null +++ b/examples/var_service/dhcpd_if/run @@ -0,0 +1,23 @@ +#!/bin/sh + +exec 2>&1 +exec >udhcpd.leases +sed 's/^interface.*$/interface '"$if/" -i udhcpc.conf + +echo "* Starting udhcpd" +exec \ +env - PATH="$PATH" \ +softlimit \ +setuidgid root \ +udhcpd -f -vv udhcpc.conf + +exit $? -- cgit v1.2.3