0

am trying to run script in background which contain command such like "asterisk -rvd >> xyz.log", when I run it directly it work well but when run it with any background way (service, cron, &, nohub,,) it stop directly with this message: stopped

so what is the prober way to run this command at background ?

Mhd
  • 1
  • 1
    My recollection is that the -r option to asterisk opens a remote console to a running instance. Having a console open when you can't enter commands into it is somewhat pointless, no? Asterisk may see that it's in background and just quit because it has no assurance that you'd be able to close that console otherwise. It also won't open a console if there isn't an asterisk daemon already running - is there one? – tsc_chazz Sep 16 '21 at 22:06

1 Answers1

0

The problem here is likely sudo. Try becoming root first (ie. "su - root" and then run the command. When I run it as root, it works without issue.

mikem
  • 408
  • 2
  • 6