Re: [Nut-upsuser] Unable run command on notify events

2011-04-08 Thread GATINEAU, ANTOINE (ANTOINE)
Hi, My deep apologizes... /tmp/alarms.txt is written when upsmon is started as daemon. So the script is called but doesn't work in that case. What are the restriction for the execution contexte called by NOTIFYCMD? Antoine De :

Re: [Nut-upsuser] Unable run command on notify events

2011-04-08 Thread GATINEAU, ANTOINE (ANTOINE)
Hi again, 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

Re: [Nut-upsuser] Unable run command on notify events

2011-04-08 Thread Arjen de Korte
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 ;