[asterisk-users] `asterisk -x reload` does not working in `while` expression.
YCH
dontdieych at gmail.com
Sun Apr 12 00:37:16 CDT 2015
Hello,
Reload extensions.conf works well both in CLI and excute `asterisk -x
reload` in shell. But it does not working with `while` expression. I
use fish shell but it also does not working in bash.
```
while inotifywait -e MOVE_SELF /etc/asterisk/extensions.conf
asterisk -x 'help core reload'
asterisk -x 'core reload'
asterisk -x 'dialplan reload'
asterisk -x 'module reload'
asterisk -x 'config reload extensions.conf'
sleep 2
end
Setting up watches.
Watches established.
/etc/asterisk/extensions.conf MOVE_SELF
Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Usage: core reload
Execute a global reload.
Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Dialplan reloaded.
Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Setting up watches.
Watches established.
```
You can see `help core reload` working. But any reload command does
not working with changed extensions.conf.
Please anyone can test this? here is bash version,
```
while inotifywait -e MOVE_SELF /etc/asterisk/extensions.conf; do
asterisk -x 'reload'; sleep 2; done
(then edit and save extensions.conf)
```
ubuntu 14.04
asterisk 11.7
Thanks.
--
YCH
More information about the asterisk-users
mailing list