this is my exact error
wall: cannot get tty name: Inappropriate ioctl for device
wall: cannot get tty name: Inappropriate ioctl for device
/root/freepbxcron.sh: line 11: a: command not found
this is my exact error
wall: cannot get tty name: Inappropriate ioctl for device
wall: cannot get tty name: Inappropriate ioctl for device
/root/freepbxcron.sh: line 11: a: command not found
Sooner or kater domeone will ask âwhat exactly does this script containâ
this script is just containing a bash command for amportal nothing more or less, I removed the link to my PHP file as it was not needed.
the bash script works when ran as ./freepbxcron.sh and reloads no errors but ran through webmin as a cron returns, those 3 errors.
Your script just does not work, post it you want help. No mind readers here
#!/bin/bash
amportalcmd=`/usr/bin/which amportal `
wallcmd=`/usr/bin/which wall`
phpcmd=`/usr/bin/which php`
chowncmd=`/usr/bin/which chown`
#echo Starting PHP script | $wallcmd
#$phpcmd -f /var/www/html/extensioninput.php 2>&1
echo Granting asterisk WRITE permissions on /var/lib/asterisk/bin/ | $wallcmd
$chowncmd -R asterisk:asterisk /var/lib/asterisk/bin/
echo Reloading FreePBX | $wallcmd
$amportalcmd a r
this is the script was made by el_es
the big letter are commented out lol
Because amportal is not sh friendly (nor the underlying freepbx_engine) you will probably find
SHELL=/bin/bash
0 1 * * * /usr/bin/env amportal admin reload
Works fine
thanks dicko i think, i will just use cron tab for this one thanks for all the help everyone.
sorry i should have asked and didnt is this crontab, i would enter this inside ?
Yes
crontab -u user -e
But you can do it the same in webmin
doesnt seem to be working for me i have no idea why i have this
12 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
0 1 * * * php -f /var/log/asterisk/asterisk-full-backup.php >/dev/null 2>&1 #Asterisk Full Log Backup Daily
SHELL=/bin/bash
ok so i found the fix to my issue.
thank you dicko and everyone for the help.
what i did was take out the variable $amportalcmd and replace it with
/usr/local/sbin/amportal a r
it now work and reloads thank you everyone for all your help
regards
Brian
What does the email notification contain?
What version of FreePBX? if a beta version that would be fwconsole reload and fwconsole does seem to be happy with sh
FreePBX 12.0.68
is my Version.
it was just a case of defining the path and then it worked.
glad it worked out for you now.
[ deleted lines, I just tried and the space isnât an issue]