hello,
i have set up a asteriks voip and add a cronjob to send the output of a specific command to my email after the cronjob shutdown -r now.
now i need a script that prevents the cronjob
(reboot and email) from being executed if this command: asteriks -rx "show channels" states active connections
(to prevent active calls being terminated)
the output of the command above
(asteriks -rx "show channels") is as follows
(if there are no calls)
Code:
channel location state application(data)
0 active channels
0 active calls
i know this sounds complicated but what it comes down to that i basically need some kind of if and else statement in crontab
hope some 1 can help me with this
regards,