diff options
| author | Stan Grishin <stangri@melmac.ca> | 2023-07-23 05:22:04 +0000 |
|---|---|---|
| committer | Stan Grishin <stangri@melmac.ca> | 2023-07-23 05:22:04 +0000 |
| commit | 649fbcf9fcab34df3d39b0642cd5b566eefb569e (patch) | |
| tree | d9c1daf4d2dda00bfeabac4cec3d28d8c85fc109 /net/https-dns-proxy/files/https-dns-proxy.init | |
| parent | efdbac38dc8b649ca26b49fac27abeb5cf76cd28 (diff) | |
https-dns-proxy: improve CLI messaging
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'net/https-dns-proxy/files/https-dns-proxy.init')
| -rwxr-xr-x | net/https-dns-proxy/files/https-dns-proxy.init | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/net/https-dns-proxy/files/https-dns-proxy.init b/net/https-dns-proxy/files/https-dns-proxy.init index d63dad9c5..e403686a6 100755 --- a/net/https-dns-proxy/files/https-dns-proxy.init +++ b/net/https-dns-proxy/files/https-dns-proxy.init @@ -67,7 +67,7 @@ uci_changes() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} changes "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" } -dnsmasq_restart() { [ -x /etc/init.d/dnsmasq ] || return 0; /etc/init.d/dnsmasq restart >/dev/null 2>&1; } +dnsmasq_restart() { [ -x /etc/init.d/dnsmasq ] || return 1; /etc/init.d/dnsmasq restart >/dev/null 2>&1; } version() { echo "$PKG_VERSION"; } @@ -223,7 +223,7 @@ start_service() { local procd_fw_src_interfaces local port=5053 - output "Starting $serviceName " + output "Starting $serviceName instances " config_load "$packageName" config_get_bool canary_domains_icloud 'config' 'canary_domains_icloud' '1' config_get_bool canary_domains_mozilla 'config' 'canary_domains_mozilla' '1' @@ -240,11 +240,21 @@ start_service() { dhcp_backup 'create' config_load "$packageName" config_foreach start_instance "$packageName" + output "\\n" if [ -n "$(uci_changes dhcp)" ]; then - uci_commit 'dhcp' - dnsmasq_restart + output "Updating dnsmasq config " + if uci_commit 'dhcp'; then + output_okn + else + output_failn + fi + output "Restarting dnsmasq " + if dnsmasq_restart; then + output_okn + else + output_failn + fi fi - output "\\n" } stop_service() { |
