Citeren "GATINEAU, ANTOINE (ANTOINE)" <antoine.gatin...@alcatel-lucent.com>:

I got it working. Aparently, the script is launched as the specified user but without the environment variables.
To make it work, i have defined NOTIFYCMD as following :
NOTIFYCMD "/bin/bah -c 'source /etc/profile ; /path/to/script/scriptname"

Is there a better way or is this the best way?

Scripts must be self-contained. It is grievous mistake to assume anything about the environment. So it is best to follow Arnaud's advice and use absolute paths to other scripts/binaries that you need. If that's not possible, it is probably better to source /etc/profile from within the script you're running.

Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Reply via email to