Skip to content

Commit

Permalink
packages: clean up uci-defaults, add missing guards
Browse files Browse the repository at this point in the history
- Remove redundant freifunk-olsrv1 script
- Remove freifunk script, move its contents to uhttpd
- Add guards for network, pingcheck, wireless

Signed-off-by: Packet Please <[email protected]>
  • Loading branch information
pktpls committed Jul 12, 2023
1 parent 88c692a commit 1c36858
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 0 additions & 3 deletions packages/falter-common/files/etc/uci-defaults/freifunk

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

. /lib/functions.sh

. /lib/functions/guard.sh
guard "network"

# remove the sta interface, leaving only wan
uci del pingcheck.@interface\[1\]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ guard "uhttpd"
uci set uhttpd.px5g.commonname="Freifunk Berlin - $(dd if=/dev/urandom bs=4 count=1 | hexdump -e '1/1 "%02x"')"
# do force redirect to https for encrypted web interface
uci set uhttpd.main.redirect_https=1

# Disable filtering requests from RFC1918 IP addresses.
# This is a DNS rebinding countermeasure that we don't want,
# since we use the 10.0.0.0/8 space for OLSR meshing.
uci set uhttpd.main.rfc1918_filter=0

uci commit

service uhttpd reload
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
. /lib/config/uci.sh
. /lib/functions/system.sh

. /lib/functions/guard.sh
guard "wireless"

mac_addr=$(get_mac_label | cut -c 10-)

if [ -z "$mac_addr" ]; then
Expand Down
6 changes: 0 additions & 6 deletions packages/falter-common/files/etc/uci-defaults/freifunk-olsrv1

This file was deleted.

0 comments on commit 1c36858

Please sign in to comment.