Skip to content

Commit

Permalink
falter-berlin-migration: migrate https-direction
Browse files Browse the repository at this point in the history
Enabling https-redirection for luci needs to be migrated on
old systems.

Signed-off-by: Martin Hübner <martin.hubner@web.de>
(cherry picked from commit 9b99cad)
  • Loading branch information
Akira25 committed Apr 20, 2022
1 parent b921500 commit 555e74f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,13 @@ r1_2_1_olsrd_watchdog_crontab() {
/etc/init.d/cron restart
}

r1_2_2_https_interface() {
log "enabling redirection to TLS-encrypted LuCI-Interface"
uci set uhttpd.main.redirect_https=1
uci commit uhttpd
service uhttpd reload
}

migrate () {
log "Migrating from ${OLD_VERSION} to ${VERSION}."

Expand Down Expand Up @@ -1121,6 +1128,10 @@ migrate () {
r1_2_1_olsrd_watchdog_crontab
fi

if semverLT ${OLD_VERSION} "1.2.2"; then
r1_2_2_https_interface
fi

# overwrite version with the new version
log "Setting new system version to ${VERSION}."
uci set system.@system[0].version=${VERSION}
Expand Down

0 comments on commit 555e74f

Please sign in to comment.