HOME
DOWNLOADS
SHOP
ACTIVATION CENTER
Professional
Support
Community
Contact
Imprint
Privacy Policy
Forum
Wiki
Donations
Bugtracker
Imprint
Privacy Policy
DD-WRT
Community
Contact
Donations
Forum
Wiki
Bugtracker
Imprint
Privacy Policy
Quick Links
Log in
Profile
View unanswered posts
Log in
Username:
Password:
Log me on automatically each visit
Script to Toggle WiFi
DD-WRT Forum Index
->
General Questions
View previous topic
::
View next topic
Author
Message
moonbug
DD-WRT Novice
Joined: 17 Feb 2010
Posts: 29
Posted: Mon May 12, 2014 15:45
Post subject: Script to Toggle WiFi
I tried running the script below but get error /tmp/custom.sh: line 6: mixed: not found
#!/bin/sh
if "`nvram get wl0_net_mode`" = "mixed"; then
nvram set wl0_net_mode="disabled"
else
nvram set wl0_net_mode="mixed"
fi
Back to top
Sponsor
matth::
DD-WRT Novice
Joined: 13 Sep 2017
Posts: 30
Posted: Tue May 15, 2018 22:03
Post subject:
This will work for Linksys WRT3200ACM:
Code:
#!/bin/sh
if [ "`nvram get ath0_net_mode`" = "disabled" ]
then stopservice lan
nvram set ath0_net_mode=acn-mixed
nvram set ath1_net_mode=ng-only
startservice lan
else stopservice wland
nvram set ath0_net_mode=disabled
ifconfig ath0 down
nvram set ath1_net_mode=disabled
ifconfig ath1 down
killall hostapd
fi
_________________
Router: Linksys WRT3200ACM (DD-WRT enabled)
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Page
1
of
1
DD-WRT Forum Index
->
General Questions
All times are GMT
Navigation
Jump to:
Select a forum
Forum Rules and Guidelines
----------------
Forum Rules and Guidelines English
Forum Regeln and Anleitungen Deutsch
Правила форума и рекомендации: Russian
DD-WRT (English)
----------------
Announcements
Atheros WiSOC based Hardware
Broadcom SoC based Hardware
General Questions
ARM or PPC based Hardware
Marvell MVEBU based Hardware (WRT1900AC etc.)
Senao Devices
Ubiquiti Devices
Ralink SoC based Hardware
X86 based Hardware
Broadcom Customer Downloads & Updates
Advanced Networking
Search & Find, Sales & Offers
Hardware DIY / Hardware Mods
DD-WRT (Deutsch)
----------------
Ankündigungen
Atheros WiSOC basierende Hardware
Broadcom SoC basierende Hardware
Allgemeine Fragen
ARM oder PPC basierte Hardware
X86 basierende Hardware
Ralink SoC basierte Hardware
DD-WRT (Español)
----------------
Anuncios
Hardware basado en Atheros
Hardware basado en Broadcom
DD-WRT (Communauté francophone)
----------------
Annonces Officielles
Questions générales
Matériels à base de Broadcom
Matériels à base de Atheros
Matériels à base de Ralink
Le Bistrot
DD-WRT (Russian)
----------------
Объявления
Использование и установка DD-WRT
Оборудование на основе Atheros WiSOC
Оборудование на основе Broadcom
Оборудование на основе X86 / WRAP / Soekris
Личные покупки и продажи
Устройства Ubiquiti
Оборудование на основе Ralink
DD-WRT по-русски
Development
----------------
Generic Questions
Contributions Upload
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
You
can
attach files in this forum
You
can
download files in this forum
Quick Links
Log in
Profile
View unanswered posts
Log in
Username:
Password:
Log me on automatically each visit