iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various fixes
[automated-distro-installer]
/
wrt-setup
diff --git
a/wrt-setup
b/wrt-setup
index 041630927a60204c73ecc7f8ca7920b38059a3b0..15f28cb7f553d3885eb1d0a86d5d070d1572afca 100755
(executable)
--- a/
wrt-setup
+++ b/
wrt-setup
@@
-25,7
+25,6
@@
pmirror() {
# doesn't go into the firmware. build new firmware if you want
# lots of upgrades.
f=(/tmp/opkg-lists/*)
# doesn't go into the firmware. build new firmware if you want
# lots of upgrades.
f=(/tmp/opkg-lists/*)
- f=${f[0]}
if ! (( $(date -r $f +%s) + 60*60*24 > $(date +%s) )); then
opkg update
fi
if ! (( $(date -r $f +%s) + 60*60*24 > $(date +%s) )); then
opkg update
fi
@@
-193,7
+192,7
@@
config rule
option dest_port 22
config redirect
option dest_port 22
config redirect
- option name ssh
+ option name ssh
alt
option src wan
option src_dport 2222
option dest_port 22
option src wan
option src_dport 2222
option dest_port 22
@@
-227,6
+226,18
@@
config rule
option target ACCEPT
option dest_port 80
option proto tcp
option target ACCEPT
option dest_port 80
option proto tcp
+
+config redirect
+ option name syncthing
+ option src wan
+ option src_dport 22001
+ option dest_ip 192.168.1.2
+ option dest lan
+config rule
+ option src wan
+ option target ACCEPT
+ option dest_port 22001
+
EOF
EOF
@@
-235,8
+246,8
@@
EOF
dnsmasq_restart=false
v cedit /etc/hosts <<EOF || dnsmasq_restart=true
192.168.1.1 wrt
dnsmasq_restart=false
v cedit /etc/hosts <<EOF || dnsmasq_restart=true
192.168.1.1 wrt
-192.168.1.2 treetowl
$IMPERSONAL_DOMAIN faiserver
-192.168.1.3 frodo
+192.168.1.2 treetowl
mail.iankelling.org $HOME_DOMAIN
+192.168.1.3 frodo
faiserver
192.168.1.4 htpc
192.168.1.5 x2
192.168.1.6 demohost
192.168.1.4 htpc
192.168.1.5 x2
192.168.1.6 demohost
@@
-263,6
+274,10
@@
fi
# useful: http://wiki.openwrt.org/doc/howto/dhcp.dnsmasq
# useful: http://wiki.openwrt.org/doc/howto/dhcp.dnsmasq
+# sometimes /mnt/usb fails, cuz it's just a flash drive,
+# so make sure we have this dir or else dnsmasq will fail
+# to start.
+mkdir -p /mnt/usb/tftpboot
v cedit /etc/dnsmasq.conf <<'EOF' || dnsmasq_restart=true
############ updating dns servers ###################3
v cedit /etc/dnsmasq.conf <<'EOF' || dnsmasq_restart=true
############ updating dns servers ###################3