Custom config files - XIYO/asuswrt-merlin.ng-kr GitHub Wiki
λΌμ°ν°μμ μ€νλλ μλΉμ€λ€, μλ₯Ό λ€μ΄ minidlna λλ _dnsmasq_λ λμ μΌλ‘ μμ±λ μ€μ νμΌμ μμ‘΄ν©λλ€. μ΄λ¬ν μ€μ νμΌλ€μ μ¬μ©μ μ μνκΈ° μν΄ λ€μν λ°©λ²λ€μ μ¬μ©ν μ μμ΅λλ€.
μ¬μ©μ μ μ μ€μ μ§μ νμ±ν
μ΄ κΈ°λ₯μ κΈ°λ³Έμ μΌλ‘ λΉνμ±νλμ΄ μμ΅λλ€. νμ±ννλ €λ©΄ κ΄λ¦¬ -> μμ€ν μΌλ‘ μ΄λν λ€μ JFFS μΉμ μμ νμ±ννμΈμ.
μ¬μ©μ μ μ μ€μ μΌλ‘ μΈν΄ λΌμ°ν° μ κ·Όμ΄ μ°¨λ¨λμλ€λ©΄, 곡μ₯ μ΄κΈ°νλ₯Ό ν΅ν΄ λΌμ°ν°μ λ€μ μ κ·Όν μ μμ΅λλ€.
μ€μ νμΌμ λ΄μ© μΆκ° λλ λ체
νμ¨μ΄μ μν΄ μμ±λ λ€μν μ€μ νμΌμ λ΄μ©μ μΆκ°νκ±°λ, μ¬μ©μκ° λ§λ μ€μ νμΌλ‘ μμ ν λ체ν μ μμ΅λλ€. μ€μ νμΌ μ€λ²λΌμ΄λλ _/jffs/configs/_μ μ μ₯λμ΄μΌ ν©λλ€. νμ¨μ΄μ μν΄ μμ±λ νμΌμ μ€μ νμΌμ μΆκ°νλ €λ©΄, μλ λͺ©λ‘μμ νμΌ μ΄λ¦ λμ _".add"_λ₯Ό μΆκ°νμΈμ. μλ₯Ό λ€μ΄:
/jffs/configs/dnsmasq.conf.add
λ νμ¨μ΄μ μν΄ μμ±λ dnsmasq μ€μ νμΌ λμ μΆκ°λ©λλ€. λ°λ©΄μ:
/jffs/configs/dnsmasq.conf
λ κ·Έκ²μ μμ ν λ체ν©λλ€.
μ체 μ€μ νμΌλ‘ λ체νλ κ²μ νμ¨μ΄μ μν΄ λμ μΌλ‘ μμ±λλ λͺ¨λ νλλ₯Ό μ μ ν μ±μ°λ κ²μ μλ―Έν©λλ€. μΌλΆ νλͺ©μ λμ νλΌλ―Έν°κ° νμνκΈ° λλ¬Έμ, postconf μ€ν¬λ¦½νΈλ₯Ό μ¬μ©νλ κ²μ΄ λ λμ μ μμ΅λλ€(μλμ postconf μ€ν¬λ¦½νΈ μΉμ μ°Έμ‘°).
μ¬μ© κ°λ₯ν μ€μ νμΌ μ€λ²λΌμ΄λ λͺ©λ‘:
- adisk.service
- afpd.service
- avahi-daemon.conf
- cake-qos.conf (cake-qos.conf.addλ§ μ§μ)
- dhcp6s.conf
- dnsmasq.conf
- exports (exports.addλ§ μ§μ)
- fstab (fstabλ§ μ§μ, μ΄κΈ° μμ μ λ§μ΄νΈ ν¬μΈνΈκ° μλ€λ©΄ λ¨Όμ μμ±νμΈμ!)
- group, gshadow, passwd, shadow (.add λ²μ λ§ μ§μ)
- hosts (/etc/hostsμ©)
- igmpproxy.conf
- inadyn.conf
- minidlna.conf
- mt-daap.service
- nanorc (.add μ§μ μμ) - μ¬κΈ°μ λ¬Έμνλ¨ (μΈλΆ νμ΄μ§). 384.3 μ΄μ.
- pptpd.conf
- profile (μ νλ‘ν, profile.addλ§ μ§μ)
- smb.conf
- snmpd.conf
- stubby.yml (stubby.yml.addλ§ μ§μ)
- torrc
- vsftpd.conf
- upnp (miniupnpdμ©)
- wgclient%d (%d = λ¨μ λ²νΈ)
- wgserver
- wgserver_peer (λ‘컬 μλ²μ μ°κ²°νκΈ° μν νΌμ΄ μ€μ νμΌ μμ±)
λν, λ€μ λλ ν 리μ μ체 OpenVPN ccd νμΌμ λ£μ μ μμ΅λλ€:
/jffs/configs/openvpn/ccd1/
/jffs/configs/openvpn/ccd2/
μλ²κ° μμλ λ μ΄λ€μ κ° μλ² μΈμ€ν΄μ€μ ccd λλ ν λ¦¬λ‘ λ³΅μ¬λ©λλ€.
Postconf μ€ν¬λ¦½νΈ
λΌμ°ν° μλΉμ€(μ: dnsmasq)μ μ¬μ©λλ λ§μ κ΅¬μ± μ€ν¬λ¦½νΈλ νμ¨μ΄μ μν΄ λμ μΌλ‘ μμ±λ©λλ€. μ΄λ‘ μΈν΄ κ³ κΈ μ¬μ©μλ€μ΄ μ΄λ¬ν
μ€μ μ μμ νλ κ²μ΄ μ΄λ ΅μ΅λλ€.
Postconf μ€ν¬λ¦½νΈκ° μ΄ λ¬Έμ μ ν΄κ²°μ± μ λλ€. μ΄ μ€ν¬λ¦½νΈλ λΌμ°ν°κ° κ΅¬μ± μ€ν¬λ¦½νΈλ₯Ό μμ±ν ν, κ΄λ ¨ μλΉμ€κ° μμλκΈ° μ μ μ€νλ©λλ€. μ΄λ κ΅¬μ± μ€ν¬λ¦½νΈλ₯Ό μ‘°μνκ±°λ(μ: "sed" μ¬μ©), λ°λͺ¬μ΄ μμλκΈ° μ§μ μ μ€ννκ³ μ νλ λ€λ₯Έ μ νμ μμ μ μ΄ μ€ν¬λ¦½νΈλ₯Ό μ¬μ©ν μ μμμ μλ―Έν©λλ€(μ: λ°©νλ²½ κ·μΉ μμ , μλ¦Ό λ‘κΉ λ±).
Postconf μ€ν¬λ¦½νΈλ _/jffs/scripts/_μ μ μ₯λμ΄μΌ ν©λλ€. λμ μ€μ νμΌμ κ²½λ‘/νμΌλͺ μ postconf μ€ν¬λ¦½νΈμ μΈμλ‘ μ λ¬λ©λλ€. μ€ν¬λ¦½νΈ μμ±μ λν μΌλ°μ μΈ μ£Όμμ¬νλ μ¬κΈ°μμ μ½μ΄λ³΄μΈμ.
μ¬μ© κ°λ₯ν postconf μ€ν¬λ¦½νΈ λͺ©λ‘μ λ€μκ³Ό κ°μ΅λλ€:
- adisk.postconf (νμ λ¨Έμ )
- afpd.postconf (νμ λ¨Έμ )
- avahi-daemon.postconf (νμ λ¨Έμ )
- dhcp6s.postconf
- dnsmasq.postconf
- exports.postconf
- fstab.postconf
- group.postconf
- gshadow.postconf
- hosts.postconf
- igmpproxy.postconf
- inadyn.postconf
- ipsec.postconf
- minidlna.postconf
- mt-daap.postconf
- openvpnclient1.postconf (1λΆν° 5κΉμ§)
- openvpnserver1.postconf (1 λλ 2)
- passwd.postconf
- pptpd.postconf
- shadow.postconf
- smb.postconf
- snmpd.postconf
- strongswan.postconf
- stubby.postconf
- torrc.postconf
- upnp.postconf
- vsftpd.postconf
- wgclient%d.postconf (%d = λ¨μ λ²νΈ, 1λΆν° 5κΉμ§)
- wgserver.postconf
- wgserver_peer.postconf (μ격 νΌμ΄ μ€μ νμΌ μμ±μ©)
"sed"μ 볡μ‘ν μΈλΆμ¬νμ λ°°μ°κ³ μΆμ§ μμ μ΄λ³΄ μ¬μ©μλ₯Ό μν΄, μ§μ ν¨μλ₯Ό μ 곡νλ μ€ν¬λ¦½νΈκ° μ 곡λ©λλ€. λ€μμ dnsmasq.postconf μ€ν¬λ¦½νΈλ₯Ό μ¬μ©νμ¬ dnsmasq ꡬμ±μμ μ΅λ λ¦¬μ€ μλ₯Ό μμ νλ λ°©λ²μ 보μ¬μ€λλ€:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_replace "dhcp-lease-max=253" "dhcp-lease-max=100" $CONFIG
_helper.sh_λ₯Ό ν΅ν΄ νμ¬ μ¬μ© κ°λ₯ν ν¨μλ€μ λ€μκ³Ό κ°μ΅λλ€:
pc_replace "κΈ°μ‘΄ λ¬Έμμ΄" "μ λ¬Έμμ΄" "μ€μ νμΌλͺ
"
pc_insert "μ°Ύμ λ¬Έμμ΄" "μ½μ
ν λ¬Έμμ΄" "μ€μ νμΌλͺ
"
pc_append "μΆκ°ν λ¬Έμμ΄" "μ€μ νμΌλͺ
"
pc_delete "μμ ν λΌμΈ λ΄ λ¬Έμμ΄" "μ€μ νμΌλͺ
"
μ£Όμν μ μ postconf μ€ν¬λ¦½νΈκ° μ€νλλ λμ νμ¨μ΄κ° μ°¨λ¨λλ€λ κ²μ λλ€. μ΄λ μλΉμ€κ° μ€ν¬λ¦½νΈκ° μλ£λ λκΉμ§ μμλμ§ μλλ‘ νκΈ° μν¨μ λλ€. μ΄λ¬ν μ€ν¬λ¦½νΈκ° μ λλ‘ μ’ λ£λμ΄μΌ νλ©°, κ·Έλ μ§ μμΌλ©΄ λΌμ°ν°κ° λΆν μ€μ λ©μΆ μ μμΌλ©°, μ΄λ₯Ό 볡ꡬνκΈ° μν΄μλ 곡μ₯ μ΄κΈ°νκ° νμν μ μμ΅λλ€.