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

Re: Bash script calling python script fails



Le 16/06/2015 17:38, rudu a écrit :
Tomas, you hit something here I guess : I ran the symlink as root from /etc/network/if-up.d/
:/etc/network/if-up.d# ./dynhost
And received the same e-mail as after a reboot (see below) + my dynhost address has not been updated
Well, I finally got it right.
I overlooked some piece of code I thought was of no consequence ... but it was :
EXEDIR=$(dirname $0)
echo $EXEDIR
cd "${EXEDIR}"

When launched from the symlink, this code set the working directory to if-up.d where no python script was to be found.
My bad, but thanks a lot to Tomas for having put me on the right track.

Rudu

Reply to: