Op <Sat, 16 Oct 2010 22:00:53 +0200> schreef Jaap van Wingerde <[email protected]> in bericht <[email protected]>:
> Als ik via het script met wget de pagina opvraag krijg ik de volgende > foutmeldingen. > "--2010-10-16 21:52:09-- http://172.19.3.1/reset/index.html > Connecting to 172.19.3.1:80... connected. > HTTP request sent, awaiting response... 401 Unauthorized > Connecting to 172.19.3.1:80... connected. > HTTP request sent, awaiting response... 401 Unauthorized > Authorization failed." > > Handmatig op de prompt lukt het wel: > "j...@custard:~/data/development/cj_restart$ wget --http-user=user > --password=password --post-data 'rmbutton&VALUE=Restart' > http://172.19.3.1/reset/index.html > --2010-10-16 21:53:30-- http://172.19.3.1/reset/index.html > Connecting to 172.19.3.1:80... connected. > HTTP request sent, awaiting response... 401 Unauthorized > Connecting to 172.19.3.1:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: unspecified [text/html] > Saving to: `index.html' > > [ <=> ] 678 --.-K/s in 0.02s > > 2010-10-16 21:53:30 (29.8 KB/s) - `index.html' saved [678]" Ik heb een work around gevonden. Je kunt user en password ook in de url doen: wget --post-data 'rmbutton&VALUE=Restart' http://user:[email protected]/reset/index.html En toen deed mijn scriptje het weer <zucht van verlichting>. -- Jaap van Wingerde e-mail: [email protected] web: http://jaap.vanwingerde.net/
signature.asc
Description: PGP signature
