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

Bash script calling python script fails



Hello,
There's something I just can't figure out :
I wrote a bash script to compare my actual IP address to the one of my DynDNS service provider. That bash script calls a python script (provided by the DynDNS service) to update my DynDNS Address if necessary. Everything runs smoothly when I run my script by hand as root or as a standard user.

But when I put a symbolic link to my script in /etc/network/if-up.d/ in order to make the checking / updating automatic at boot time, the python script doesn't seem to be launched at all, although my Bash script logs fine and sends me a success e-mail.

What could prevent a python script to be executed in such circumstances ?

FWIW : my bash script : dynhost    /    the python script : ipcheck.py
$ ls -al /etc/network/if-up.d/
total 44
[...]
lrwxrwxrwx 1 root root 26 nov. 24 2014 dynhost -> /home/rudu/DynHost/dynhost

$ ls -al DynHost/
total 296
drwxr-xr-x   2 rudu rudu   4096 juin  12 08:13 .
drwxr-xr-x 109 rudu rudu   4096 juin  15 11:46 ..
-rwxr--r--   1 rudu rudu   2148 juin  11 09:05 dynhost
-rw-r--r--   1 rudu rudu  18800 juin  16 09:51 dynhost.log
-rw-r--r--   1 rudu rudu    104 juin  16 09:48 index.html
-rw-r--r--   1 rudu rudu     29 juin   3 08:36 ipcheck.dat
-rw-r--r--   1 rudu rudu     15 juin   3 08:36 ipcheck.html
-rwxr-xr-x   1 rudu rudu  57008 janv. 15  2004 ipcheck.py

Thanks
Rudu


Reply to: