Outils pour utilisateurs

Outils du site


maison2:configuration_open_wrt:installed

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
maison2:configuration_open_wrt:installed [04/2012] – [se faire un initapp] fredmaison2:configuration_open_wrt:installed [07/2013] (Version actuelle) – [Mettre à jour dynhost (ovh) en php] fred
Ligne 74: Ligne 74:
  
  
-====== configuer le bouton pour le wifi ====== 
-<code> 
-BUTTON    Event  
-RESTORE   reset   
-EZSETUP   ses  
- 
-mkdir -p /etc/hotplug.d/button 
-wget -O /etc/hotplug.d/button/01-wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.hotplug1" 
- 
-wget -O /etc/config/wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.config1" 
- 
-  * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses 
-  * en kamikaze8.09 : voir la nouvelle procédure ...  
-[[maison2:configuration_open_wrt:kamikaze_8_09_rc1]]  
- 
-uci commit wifitoggle  
- 
-dans /etc/hotplug.d/button/01-wifitoggle 
-modifier  
-local section="cfg1" 
-par si kamikaze 8.09 
-local section="cfg022c70" 
- 
- 
- 
-rajouter dans case "$WIFI_RADIOSTATUS" in 
-                0|"") 
-                        uci_set "wireless" "$section" "disabled" "1" 
-                        uci_commit "wireless" 
-                        echo 0 >> /proc/diag/led/power    <=============ligne a ajouter 
-                        wifi 
-                ;; 
-                1) 
-                        uci_set "wireless" "$section" "disabled" "0" 
-                        uci_commit "wireless" 
-                        echo 1 >> /proc/diag/led/power    <=============ligne a ajouter 
-                        wifi 
-                ;; 
- 
-</code> 
  
 ====== NTP ====== ====== NTP ======
Ligne 194: Ligne 154:
 root@OpenWrt:/dev/usb/tts# ls root@OpenWrt:/dev/usb/tts# ls
 0  1 0  1
 +</code>
 +
 +====== OWFS ======
 +[[maison2:configuration_open_wrt:OWFS]]
 +====== se faire un initapp ======
 +--> utiliser le fichier de demrrage de webbif : system->startup
 +====== dyndns ======
 +installer updatedd et updatedd-mod-ovh
 +
 +petit script activer au demarrage : 
 +<code bash dyndns_update>
 +#!/bin/sh
 +registered="0.0.0.0"
 +
 +max_days=10 # max number of days to go without forcing an update
 +last_update=`date +%s`
 +
 +max_seconds=`expr $max_days*24*60*60`
 +
 +while :; do
 +        current=$(wget -O - http://checkip.dyndns.org|sed s/[^0-9.]//g)
 +
 +        if [ $(($last_update+$max_seconds)) -lt `date +%s` ]
 +        then
 +                # set old_ip to be different, forcing an update
 +                registered="0.0.0.0"
 +        fi
 +        if [ "$current" != "$registered" ]
 +        then
 +                updatedd ovh -- --ipv4 $current user:psw public_URL
 +                registered=$current
 +                last_update=`date +%s`
 +        fi
 +        sleep 300
 +done
 +</code>
 +ce script plante de temps en temps en restant planté sur le wget
 +
 +__lien de support :__
 +  * http://kubuntu.free.fr/wiki/?page=OpenWrt_backfire  a regarder pour WOL et updatedd
 +  * http://lermit-informatique.blogspot.fr/2009/08/ovh-le-dynhost-de-ovh-et-updatedd.html
 +===== Mettre à jour dynhost (ovh) en php =====
 +<code php>
 +
 +$credentials = "identifiantdynhost:motdepasseovh";
 +$url = "http://www.ovh.com/nic/update?system=dyndns&hostname=nomdedomaine&myip=ip";
 +$headers = array( "User-Agent: ipcheck/0.67", "Authorization: Basic " . base64_encode($credentials));
 +$ch = curl_init();
 +curl_setopt($ch, CURLOPT_URL,$url);
 +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 +curl_setopt($ch, CURLOPT_TIMEOUT, 60);
 +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 +
 +$data = curl_exec($ch);
 +  if (curl_errno($ch)) print "Error: " . curl_error($ch);
 +
 +echo $data; 
 +
 +//variante dans un genre de shell
 +#     Update DynDNS with the new IP
 +    :set DynDNSUrl ("http://".$DynDNSUsername.":".$DynDNSPassword."@".$DynDNSServiceProvider."
 +/nic/update?system=dyndns&hostname=".$DynDNSHostname."&myip=".$CurrentPublicIP."&wildcard=no");
 +    /tool fetch url=$DynDNSUrl dst-path="/dyndns.txt";
 +
 +</code>
 +
 +[[http://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe/download?use_mirror=heanet|wget pour windows]] solution pour papa
 +
 +====== configuer le bouton pour le wifi sur le WL500GP (non utilisé) ======
 +<code>
 +BUTTON    Event 
 +RESTORE   reset  
 +EZSETUP   ses 
 +
 +mkdir -p /etc/hotplug.d/button
 +wget -O /etc/hotplug.d/button/01-wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.hotplug1"
 +
 +wget -O /etc/config/wifitoggle "http://wiki.openwrt.org/OpenWrtDocs/Customizing/Software/WifiToggle?action=AttachFile&do=get&target=wifitoggle.config1"
 +
 +  * en kamikaze7.08 : uci set wifitoggle.cfg1.button=ses
 +  * en kamikaze8.09 : voir la nouvelle procédure ... 
 +[[maison2:configuration_open_wrt:kamikaze_8_09_rc1]] 
 +
 +uci commit wifitoggle 
 +
 +dans /etc/hotplug.d/button/01-wifitoggle
 +modifier 
 +local section="cfg1"
 +par si kamikaze 8.09
 +local section="cfg022c70"
 +
 +
 +
 +rajouter dans case "$WIFI_RADIOSTATUS" in
 +                0|"")
 +                        uci_set "wireless" "$section" "disabled" "1"
 +                        uci_commit "wireless"
 +                        echo 0 >> /proc/diag/led/power    <=============ligne a ajouter
 +                        wifi
 +                ;;
 +                1)
 +                        uci_set "wireless" "$section" "disabled" "0"
 +                        uci_commit "wireless"
 +                        echo 1 >> /proc/diag/led/power    <=============ligne a ajouter
 +                        wifi
 +                ;;
 +
 </code> </code>
  
Ligne 326: Ligne 393:
  
  
- + ====== samba ====== 
 +<code> 
 +ipkg install samba-server 
 + 
 +/etc/hosts 
 +27.0.0.1 localhost. 
 +192.168.0.1 openwrt   <================ à ajouter  
 + 
 +to start : /etc/init.d/samba start a mettre dans /etc/init.d/done 
 + 
 +/etc/samba/smb.conf 
 +[global] 
 + syslog = 0 
 + syslog only = yes 
 + workgroup = GBA           <==================  modifié 
 + server string = OpenWrt Samba Server 
 + security = share 
 + encrypt passwords = yes 
 + guest account = nobody 
 + local master = yes 
 + name resolve order = lmhosts hosts bcast 
 + 
 +[HDD500] 
 + comment = /mnt_usb_stick 
 + path = /mnt_usb_stick 
 + browseable = yes 
 + public = yes 
 + writeable = yes 
 + 
 +[tmp] 
 + comment = /tmp 
 + path = /tmp 
 + browseable = yes 
 + public = yes 
 + writeable = no 
 + 
 +</code> 
 + 
  
  
maison2/configuration_open_wrt/installed.1333793749.txt.gz · Dernière modification : 04/2012 de fred