우선 /jffs/scripts 를 사용할수 있게 config에서 설정
Support for these scripts stored under /jffs/scripts/ must be enabled, under Administration -> System on the webui:
아래 등록 스크립트 작성
cat /jffs/scripts/add.sh
#!/bin/sh
echo "address=/youtube.com/127.0.0.1" > /jffs/configs/dnsmasq.conf.add
echo "address=/prod.kr.lol.riotgames.com/127.0.0.1" >> /jffs/configs/dnsmasq.conf.add
service restart_dnsmasq
아래 삭제 스크립트 작성
cat /jffs/scripts/del.sh
#!/bin/sh
echo "" > /jffs/configs/dnsmasq.conf.add
service restart_dnsmasq
실행 권한 주기
chmod 755 /jffs/scripts/add.sh
chmod 755 /jffs/scripts/del.sh
크론탭에 등록하기
예제는 24:00 에 차단 07:00 에 차단해제
cru a add_dnsmasq "0 0 * * * /jffs/scripts/add.sh"
cru a del_dnsmasq "0 7 * * * /jffs/scripts/del.sh"
참고
크론탭 등록 방법
https://www.cyberciti.biz/faq/how-to-add-cron-job-on-asuswrt-merlin-wifi-router/
커스텀 dnsmasq 사용 방법
https://github.com/RMerl/asuswrt-merlin.ng/wiki/Custom-domains-with-dnsmasq