source: packages/ipv6/ahcpd/files/ahcpd.init @ 20166

Last change on this file since 20166 was 20166, checked in by kerneis, 6 years ago

[package] ahcpd: Fix reload rule in init script

Signed-off-by: Gabriel Kerneis <kerneis@…>

  • Property svn:copyright set to Copyright (C) 2007 OpenWrt.org
File size: 524 bytes
Line 
1#!/bin/sh /etc/rc.common
2
3START=71
4PID_F="/var/run/ahcpd.pid"
5EXTRA_COMMANDS="status"
6EXTRA_HELP="        status Print ahcpd's status to the log file."
7
8. /lib/network/ahcp.sh
9
10start() {
11        mkdir -p /var/lib
12        config_load ahcpd
13        unset args
14        unset interfaces
15        config_foreach ahcp_config ahcpd
16        config_foreach ahcp_server ahcpd
17        [ -z "$interfaces" ] && return 0
18        eval "/usr/sbin/ahcpd -D -I $PID_F $args $interfaces"
19}
20
21stop() {
22        [ -f "$PID_F" ] && kill $(cat "$PID_F")
23}
24
25status() {
26        [ -f $PID_F ] && kill -USR1 $(cat $PID_F)
27}
Note: See TracBrowser for help on using the repository browser.