treewide: use new extra_command function for init

This commit is contained in:
CN_SZTL 2020-11-07 19:40:54 +08:00
parent 63d1fa959c
commit 71f8f2a91d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
8 changed files with 53 additions and 52 deletions
package
boot/kexec-tools/files
ctcgfw
luci-app-autoipsetadder/root/etc/init.d
luci-app-vssr/root/etc/init.d
lean
dnsforwarder/files/etc/init.d
luci-app-adbyby-plus/root/etc/init.d
ntlf9t
luci-app-brook/root/etc/init.d
openwrt-Pcap_DNSProxy/files
scutclient/files

@ -5,8 +5,7 @@ STOP=90
BOOT_IMAGE=/boot/vmlinuz
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print crashkernel status"
extra_command "status" "Print crashkernel status"
verify_kdump() {
local cfg="$1"

@ -4,11 +4,12 @@ USE_PROCD=1
START=99
STOP=01
extra_command "test_crontab" "test_crontab"
CRON_FILE=/etc/crontabs/root
CONFIGURATION=autoipsetadder
EXTRA_COMMANDS="test_crontab"
EXTRA_HELP="
test_crontab"
set_dnsmasq_log()
{
sed -i '/log-facility/d' /etc/dnsmasq.conf

@ -11,9 +11,10 @@
START=90
STOP=15
extra_command "rules"
SERVICE_DAEMONIZE=1
NAME=vssr
EXTRA_COMMANDS=rules
#定义配置文件名称
CONFIG_FILE=/var/etc/${NAME}_t.json

@ -2,6 +2,10 @@
START=60
extra_command "makeconfig"
extra_command "makegfwlist"
extra_command "health"
CRON_FILE=/etc/crontabs/root
PID_PATH=/var/run/dnsforwarder
PID_FILE=${PID_PATH}/dns.pid
@ -247,5 +251,3 @@ restart()
/etc/init.d/dnsforwarder disable
fi
}
EXTRA_COMMANDS="makeconfig makegfwlist health"

@ -3,8 +3,10 @@
START=96
STOP=10
extra_command "add_rule"
extra_command "del_rule"
extra_command "reload_rule"
EXTRA_COMMANDS="add_rule del_rule reload_rule"
PROG_PATH=/usr/share/adbyby
DATA_PATH=$PROG_PATH/data
WAN_FILE=/var/etc/dnsmasq-adbyby.d/03-adbyby-ipset.conf

@ -11,9 +11,10 @@
START=90
STOP=15
extra_command "rules"
SERVICE_DAEMONIZE=1
NAME=brook
EXTRA_COMMANDS=rules
FWI=$(uci get firewall.brook.path 2>/dev/null)
uci_get_by_name() {

@ -7,11 +7,9 @@ START=95
USE_PROCD=1
#PROCD_DEBUG=1
EXTRA_COMMANDS="status flush libver"
EXTRA_HELP=\
" flush Flush DNS cache stored in Pcap_DNSProxy and DNSMasq
libver Print library version Pcap_DNSProxy linked to
status Show the running status of Pcap_DNSProxy"
extra_command "flush" "Flush DNS cache stored in Pcap_DNSProxy and DNSMasq"
extra_command "libver" "Print library version Pcap_DNSProxy linked to"
extra_command "status" "Show the running status of Pcap_DNSProxy"
PROG=/usr/sbin/Pcap_DNSProxy
CONFDIR=/etc/pcap-dnsproxy

@ -7,10 +7,7 @@ USE_PROCD=1
SCUTCLIENT_PATH=/usr/bin/scutclient
SCUTCLIENT_CONFIG=scutclient
EXTRA_COMMANDS="logoff"
EXTRA_HELP=<<EOF
logoff Log off manually
EOF
extra_command "logoff" "Log off manually"
scutclient_validate_drcom() {
uci_validate_section scutclient drcom "${1}" \