packages/net/hs20/patches/200-adapt-config-php.patch
Daniel Golle 6855683e3e hs20: prepare server using uci-defaults and ship files
Setup user database if non-existent, configure uhttpd .php interpreter
and patch php scripts to work out-of-the-box.
Also ship Hotspot 2.0 SPP and OMA DM XML schema/DTD files needed at
run-time for both client and server.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-08-17 14:12:05 +01:00

17 lines
526 B
Diff

--- a/hs20/server/www/config.php
+++ b/hs20/server/www/config.php
@@ -1,7 +1,11 @@
<?php
-$osu_root = "/home/user/hs20-server";
+$osu_root = "/etc/hs20";
$osu_db = "sqlite:$osu_root/AS/DB/eap_user.db";
$t_c_file = "$osu_root/terms-and-conditions";
-$t_c_timestamp = 123456789;
-$hostapd_ctrl = "udg:///home/user/hs20-server/AS/ctrl/as"
+if (file_exists($t_c_file)) {
+ $t_c_timestamp = filemtime($t_c_file);
+} else {
+ $t_c_timestamp = filemtime($osu_root);
+}
+$hostapd_ctrl = "udg:///var/run/hostapd/hs20-radius/lo"
?>