diff options
-rw-r--r-- | applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi | 38 | ||||
-rw-r--r-- | applications/luci-splash/root/www/cgi-bin/luci-splash (renamed from applications/luci-splash/root/www/cgi-bin/luci_splash.cgi) | 0 | ||||
-rw-r--r-- | applications/luci-splash/src/controller/splash/splash.lua (renamed from applications/luci-splash/src/controller/controller.lua) | 0 | ||||
-rw-r--r-- | applications/luci-splash/src/model/v/splash/splash.htm (renamed from applications/luci-splash/src/model/view/splash/splash.htm) | 0 | ||||
-rw-r--r-- | applications/luci-splash/src/model/v/splash_splash/index.htm (renamed from applications/luci-splash/src/model/view/splash_splash/index.htm) | 0 | ||||
-rw-r--r-- | applications/luci-splash/src/model/v/splash_splash/splash.htm (renamed from applications/luci-splash/src/model/view/splash_splash/splash.htm) | 0 | ||||
-rw-r--r-- | contrib/package/ffluci/Makefile | 1 |
7 files changed, 19 insertions, 20 deletions
diff --git a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi index 341aaa4b5..11430f0ac 100644 --- a/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi +++ b/applications/luci-splash/root/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi @@ -29,24 +29,22 @@ end if not srv then ffluci.http.prepare_content("text/plain") - return print("Unable to detect network settings!") -end - -if not stat then + print("Unable to detect network settings!") +elseif not stat then ffluci.http.redirect("http://" .. srv) -end - -local action = "splash" - -local mac = ffluci.sys.net.ip4mac(ip) -if not mac then - action = "unknown" -end - -local status = ffluci.sys.execl("luci-splash status "..mac)[1] - -if status == "whitelisted" or status == "lease" then - action = "allowed" -end - -ffluci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action)
\ No newline at end of file +else + local action = "splash" + + local mac = ffluci.sys.net.ip4mac(ip) + if not mac then + action = "unknown" + end + + local status = ffluci.sys.execl("luci-splash status "..mac)[1] + + if status == "whitelisted" or status == "lease" then + action = "allowed" + end + + ffluci.http.redirect("http://" .. srv .. "/cgi-bin/luci-splash/" .. action) +end
\ No newline at end of file diff --git a/applications/luci-splash/root/www/cgi-bin/luci_splash.cgi b/applications/luci-splash/root/www/cgi-bin/luci-splash index 188ad7aa0..188ad7aa0 100644 --- a/applications/luci-splash/root/www/cgi-bin/luci_splash.cgi +++ b/applications/luci-splash/root/www/cgi-bin/luci-splash diff --git a/applications/luci-splash/src/controller/controller.lua b/applications/luci-splash/src/controller/splash/splash.lua index 62088be52..62088be52 100644 --- a/applications/luci-splash/src/controller/controller.lua +++ b/applications/luci-splash/src/controller/splash/splash.lua diff --git a/applications/luci-splash/src/model/view/splash/splash.htm b/applications/luci-splash/src/model/v/splash/splash.htm index db4bd0f78..db4bd0f78 100644 --- a/applications/luci-splash/src/model/view/splash/splash.htm +++ b/applications/luci-splash/src/model/v/splash/splash.htm diff --git a/applications/luci-splash/src/model/view/splash_splash/index.htm b/applications/luci-splash/src/model/v/splash_splash/index.htm index 75aa02658..75aa02658 100644 --- a/applications/luci-splash/src/model/view/splash_splash/index.htm +++ b/applications/luci-splash/src/model/v/splash_splash/index.htm diff --git a/applications/luci-splash/src/model/view/splash_splash/splash.htm b/applications/luci-splash/src/model/v/splash_splash/splash.htm index 9c165802f..9c165802f 100644 --- a/applications/luci-splash/src/model/view/splash_splash/splash.htm +++ b/applications/luci-splash/src/model/v/splash_splash/splash.htm diff --git a/contrib/package/ffluci/Makefile b/contrib/package/ffluci/Makefile index af17aa57a..8f1d7f0aa 100644 --- a/contrib/package/ffluci/Makefile +++ b/contrib/package/ffluci/Makefile @@ -156,6 +156,7 @@ define Package/ffluci-app-splash/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash endef |