This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg install transmission-remote transmission-web | |
mkdir -p /data/torrents/torrents-completed /data/torrents/torrents-incomplete /data/torrents/torrents /data/torrents/config | |
uci set transmission.@transmission[-1].enabled=1 | |
uci set transmission.@transmission[-1].config_dir=/data/torrents/config | |
uci set transmission.@transmission[-1].download_dir=/data/torrents/torrents-completed | |
uci set transmission.@transmission[-1].incomplete_dir_enabled=true | |
uci set transmission.@transmission[-1].incomplete_dir=/data/torrents/torrents-incomplete | |
uci set transmission.@transmission[-1].blocklist_enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uci set dhcp.lan.start=200 | |
uci set dhcp.lan.limit=54 | |
uci set dhcp.@dnsmasq[0].domain=xvx.cz | |
uci set dhcp.@dnsmasq[0].leasefile=/etc/dnsmasq-dhcp.leases | |
#Send email for new connections: | |
echo "dhcp-script=/etc/dnsmasq-script.sh" >> /etc/dnsmasq.conf | |
cat > /etc/dnsmasq-script.sh << \EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg install luci-app-watchcat | |
/etc/uci-defaults/50-watchcat | |
uci set system.@watchcat[0].period=1h | |
/etc/init.d/watchcat enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /data | |
mkfs.ext4 -L data /dev/mmcblk0p1 | |
uci add fstab mount | |
uci set fstab.@mount[-1].device=/dev/mmcblk0p1 | |
uci set fstab.@mount[-1].target=/data | |
uci set fstab.@mount[-1].fstype=ext4 | |
uci set fstab.@mount[-1].options=rw,sync,noatime,nodiratime | |
uci set fstab.@mount[-1].enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uci set wireless.radio0.channel=8 | |
uci set wireless.radio0.htmode=HT40- | |
uci set wireless.radio0.noscan=1 | |
uci set wireless.radio0.bursting=1 | |
uci set wireless.radio0.ff=1 | |
uci set wireless.radio0.compression=1 | |
uci set wireless.radio0.xr=1 | |
uci set wireless.radio0.ar=1 | |
uci set wireless.radio0.txpower=20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg install luci-app-vnstat vnstati | |
mkdir /etc/vnstat /www3/myadmin/vnstat | |
sed -i 's@^\(DatabaseDir\).*@\1 "/etc/vnstat"@' /etc/vnstat.conf | |
vnstat -u -i eth2 | |
vnstat -u -i wlan0 | |
vnstat -u -i br-lan | |
echo "*/5 * * * * vnstat -u" >> /etc/crontabs/root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg install bash bind-dig diffutils digitemp dstat file htop kmod-usb-serial-pl2303 less lftp lsof mc mtr nmap rsync screen ssmtp sudo tcpdump | |
#File highlighting in "mc" | |
mkdir -p /usr/lib/mc/extfs.d | |
touch /etc/mc/sfs.ini | |
wget --no-check-certificate https://raw.github.com/MidnightCommander/mc/master/misc/filehighlight.ini -O /etc/mc/filehighlight.ini | |
#Favorite "mc" settings | |
mkdir -p /etc/skel/.mc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opkg install lighttpd-mod-proxy | |
#See the http://192.168.1.1/myadmin/ for main "myadmin" page | |
mkdir -p /www3/myadmin/transmission-web | |
mkdir -p /www3/myadmin/luci | |
cp /etc/foris/foris-lighttpd-inc.conf /etc/foris/foris-lighttpd-inc.conf.orig | |
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig | |
#Let foris "listen" only on 192.168.1.1 | |
#sed -i "s@\$HTTP\[\"url\"\] !~ \"\^/static\" {.*@\$HTTP\[\"host\"\] == \"192\\.168\\.1\\.1\" {@" /etc/foris/foris-lighttpd-inc.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uci set rainbow.wifi=led | |
uci set rainbow.@led[-1].color=blue | |
uci set rainbow.@led[-1].status=auto | |
uci set rainbow.pwr=led | |
uci set rainbow.@led[-1].color=red | |
uci set rainbow.@led[-1].status=auto | |
uci set rainbow.lan=led | |
uci set rainbow.@led[-1].color=green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Configure ssh key autologin: | |
ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.1 | |
uci set system.@system[0].hostname=gate | |
uci add_list sshd.@openssh[0].Port=2222 | |
uci add firewall rule | |
uci set firewall.@rule[-1].name=ssh | |
uci set firewall.@rule[-1].src=wan | |
uci set firewall.@rule[-1].target=ACCEPT |