I wanted to add a cronjob for the asterisk user. So I logged in an tried to “crontab -l” which lists all existing cronjobs. But “crontab -e” which would be the normal thing to do gives me:
/bin/sh: /bin/vi: No such file or directory
crontab: “/bin/vi” exited with status 127
Should I just install vi or is there a place in FreePBX 12 to add a cronjobs as I searched and didn’t find anything.
@dicko Thanks for explanation. I did put export EDITOR=/usr/bin/nano in my .bashrc of the asterisk user but the interesting thing was that it didn’t help because .bashrc was not sourced by default when switching to asterisk user with “sudo su - asterisk”. I also had to put “source ~/.bashrc” in .profile But your reply got me on the right track.
Also thanks for the other with to use -u option with crontab. Never heard of that trick, of course then you could easily do it with root.