[Asterisk-Users] Re: Forcing Marker bit

Tony Mountifield tony at softins.clara.co.uk
Thu Jun 1 03:27:08 MST 2006


In article <68be8a270606010218n3753255bi7795a5c15c02c78a at mail.gmail.com>,
Andrew Furey <andrew.furey at gmail.com> wrote:
> On 6/1/06, Tony Mountifield <tony at softins.clara.co.uk> wrote:
> > # script /tmp/output.txt
> > Script started, file is /tmp/output.txt
> > # exec asterisk -rvvvvv
> > ... do asterisky stuff ...
> > host*CLI> exit
> > Script done, file is /tmp/output.txt
> > #
> 
> Actually you need another exit in there:
> 
> # script /tmp/output.txt
> Script started, file is /tmp/output.txt
> # exec asterisk -rvvvvv
> ... do asterisky stuff ...
> host*CLI> exit
> Executing last minute cleanups
> # exit
> Script done, file is /tmp/output.txt
> #

Not if you do "exec asterisk -r" as I did, instead of just "asterisk -r".
Using "exec" makes asterisk replace the shell that was started by "script",
and therefore auto-exits when you exit asterisk. That is why I use exec
in that way - it saves me forgetting the second exit and filling up the
script file with rubbish, or even worse, trying to edit it while it is
still active!

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list