I'm connecting to erlang shell of ejabberd server this way:
Code:
erl -sname node9 -remsh ejabberd@myserver
this works fine, but when I put it in script, which is called by cron/atd it doesn't work and I'm not able to connect to correct node "ejabberd".
The only thing I know is that, it works in interactive mode -> when somebody is running shell (ssh/...). But when the script is executed by some deamon or process, which doesn't have TTY associated (<- I'm not sure if I get this right) then it doesn't work.
So my problem is to simulate, that somebody is running interactive shell, where this erlang shell can be attached (more confusion here).
Is there a way to attach e.g. tty6 to running process? (again confusion) Or how to trick the erlang so I can get erlang shell in script.
Thank you