[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Eigenariges CRON Problem...



Hallo,

nachdem ich von /etc/network/if-up.d/ keine  neuen  logbare  IP  bekomme
wenn  die  DHCP  release  ungültig  wird,  habe  ich  folgendes   Script
geschrieben:

----[ '~/bin/get_current_ip' ]------------------------------------------
#!/bin/bash -x

FOO="$1"

DATE=$(/bin/date +"%Y-%m-%d %H:%M:%S")

IP=$(/usr/bin/wget --quiet -O - http://www.tamay-dogan.net/tdphp-myip.php)

echo "${DATE} :  ${IP}    ${FOO}" >>/home/michelle.konzack/log/$(/bin/date +%Y-%m-%d).log
------------------------------------------------------------------------

und einen croneintrag:

----[ '/etc/cron.d/get_current_ip' ]------------------------------------
MAILTO=michelle.konzack

* * * * * michelle.konzack /home/michelle.konzack/bin/get_current_ip cron.d
------------------------------------------------------------------------

aber das script sird nicht ausgeführt.

wenn ich jedoch ein "crontab -e" mache und die Zeile ohne ${USER}, also

----[ command 'crontab -e' ]--------------------------------------------
# m h  dom mon dow  command

* * * * * michelle.konzack /home/michelle.konzack/bin/get_current_ip crontab
------------------------------------------------------------------------

eintrage, dann geht es...

----[ '~/log/2009-05-23.log' ]------------------------------------------
2009-05-23 08:16:01 : 95.208.106.241 crontab
2009-05-23 08:17:01 : 95.208.106.241 crontab
2009-05-23 08:18:01 : 95.208.106.241 crontab
2009-05-23 08:19:01 : 95.208.106.241 crontab
2009-05-23 08:20:01 : 95.208.106.241 crontab
2009-05-23 08:21:01 : 95.208.106.241 crontab
2009-05-23 08:22:01 : 95.208.106.241 crontab
2009-05-23 08:23:01 : 95.208.106.241 crontab
------------------------------------------------------------------------

Irgendwelche ideen?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    25.9V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber linux4michelle@jabber.ccc.de           67100 Strasbourg/France
IRC #Debian (irc.icq.com)                     Tel. DE: +49 177 9351947
ICQ #328449886                                Tel. FR: +33  6  61925193

Attachment: signature.pgp
Description: Digital signature


Reply to: