Fix breaking change introduced in the main tree with a commit 7519a36774ca ("base-files,procd: add generic service status") where the old service `status` callback function doesn't work anymore and needs to be renamed to `status_service`. This name was chosen for consistency with start and stop function callbacks, which are using `start_service` and `stop_service` naming schemes. While at it, fix whitespace issues in the status_service as well. Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-September/019035.html Reported-by: Dirk Brenken <dev@brenken.org> Signed-off-by: Petr Štetiar <ynezz@true.cz>
22 lines
499 B
Bash
22 lines
499 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
START=65
|
|
|
|
USE_PROCD=1
|
|
|
|
EXTRA_COMMANDS="status"
|
|
EXTRA_HELP=" status Print the status of the service"
|
|
|
|
start_service() {
|
|
procd_open_instance
|
|
# -s: log to syslog
|
|
# -f: run in foreground
|
|
procd_set_param command /usr/bin/wifidog -s -f
|
|
procd_set_param respawn # respawn automatically if something died
|
|
procd_set_param file /etc/wifidog.conf
|
|
procd_close_instance
|
|
}
|
|
|
|
status_service() {
|
|
/usr/bin/wdctl status
|
|
}
|