Generats a e-mail when something happend

Functionality and usage of the OpenNethome Server
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Generats a e-mail when something happend

Post by stefangsbb »

I have not tried myself, but usually there are two problems involved when running thing as service: Access rights and paths. You have checked that it works when you run as nethome from a shell, and then the most likely problem is with paths. Are you specifying all executables and files via full absolute paths? You can for example find the full path to ssmtp by typing

Code: Select all

which ssmtp
rest
Posts: 19
Joined: Wed Oct 21, 2015 4:35 am

Re: Generats a e-mail when something happend

Post by rest »

God morning!

Now I have tried all things I can come up with. It seems that Nethome does execute the command but nothing happens. If I put it in with a syntax fault I will find an error in the log. If the syntax is right (working from putty) nothing can be found in anny log file and no mail is send. I checked the logs from nethome and the mail logs. Nothing...

Maybe a python script is easier?

/Reik
Raspberry PI 2 and Tellstick Duo
rest
Posts: 19
Joined: Wed Oct 21, 2015 4:35 am

Re: Generats a e-mail when something happend

Post by rest »

Hello again!

I tried to run some other shell instructions but onh does not seem to execute the instructions. No errors and no actions... Is anyone else using the exec, ??? function?

/Reik
Raspberry PI 2 and Tellstick Duo
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Generats a e-mail when something happend

Post by stefangsbb »

I have seen a few examples of others using the exec-command, in these posts for example:

viewtopic.php?f=5&t=56&p=411&hilit=exec#p411 and
viewtopic.php?f=5&t=20&p=96&hilit=exec#p96
Post Reply