mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
33 lines
438 B
Bash
Executable File
33 lines
438 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
STOP=01
|
|
|
|
APP_NAME="ruantiblock"
|
|
APP_EXEC="/usr/bin/${APP_NAME}"
|
|
|
|
config_load $APP_NAME
|
|
|
|
start() {
|
|
local update_at_startup
|
|
config_get update_at_startup config update_at_startup
|
|
$APP_EXEC start
|
|
if [ $? -eq 0 -a "$update_at_startup" = "1" ]; then
|
|
$APP_EXEC update
|
|
else
|
|
/etc/init.d/dnsmasq restart
|
|
fi
|
|
}
|
|
|
|
stop() {
|
|
$APP_EXEC stop
|
|
}
|
|
|
|
restart() {
|
|
$APP_EXEC restart
|
|
}
|
|
|
|
reload() {
|
|
$APP_EXEC reload
|
|
}
|