Skip to content

Commit

Permalink
Update configure.ash
Browse files Browse the repository at this point in the history
updated configure.ash file for download and setting up necessary files for webapp and 1 min time access
  • Loading branch information
AdityaC4 committed Aug 6, 2024
1 parent 8c8d8e6 commit 2f91e07
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion router/configure.ash
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ wifi
#uci commit network

opkg update
opkg install wget procps-ng-pkill coreutils-nohup
opkg install wget procps-ng-pkill coreutils-nohup iwinfo nodogsplash

mkdir xonefi
cd xonefi
Expand All @@ -55,3 +55,40 @@ sed -i "s|^PINGER_ADDRESS=.*|PINGER_ADDRESS=${PINGER_ADDRESS}|" spuller.ash
sed -i "s|^PINGER_USER=.*|PINGER_USER=${PINGER_USER}|" spuller.ash
sed -i "s|^PINGER_TOKEN=.*|PINGER_TOKEN=${PINGER_TOKEN}|" spuller.ash
sed -i "s|^ROUTER_NUMBER=.*|ROUTER_NUMBER=${ROUTER_NUMBER}|" spuller.ash

# Router Setup
cd /www/cgi-bin/
wget http://137.184.243.11/dist/get_local_ip.ash
wget http://137.184.243.11/dist/get_wifi_ssid.ash
chmod +x get_local_ip.ash get_wifi_ssid.ash
/etc/init.d/uhttpd restart

cd /www/
wget http://137.184.243.11/dist/xonefi-app.tar.gz
tar -xzf xonefi-app.tar.gz
mv dist/ xonefi-app
rm xonefi-app.tar.gz

cd /root/
uci set nodogsplash.@nodogsplash[0].gatewayname='XOneFi'
uci commit nodogsplash

# Copy Captive portal files
cd /etc/nodogsplash/htdocs/
rm -f splash.css splash.html status.html
wget http://137.184.243.11/dist/splash.html
wget http://137.184.243.11/dist/splash.css
wget http://137.184.243.11/dist/status.html
cd images/
wget http://137.184.243.11/dist/xmesh-favicon.jpg
wget http://137.184.243.11/dist/xonefi-logo.jpg

/etc/init.d/nodogsplash restart

# Temp 1 min access configuration
cd /root/xonefi/
wget http://137.184.243.11/dist/manage_temp_firewall.ash
chmod +x manage_temp_firewall.ash
cd /www/cgi-bin/
wget http://137.184.243.11/dist/set_temp_access.ash
chmod +x set_temp_access.ash

0 comments on commit 2f91e07

Please sign in to comment.