Hello, i am developing a module for FreePBX, i have made my module and upload it throught the module admin but i need to install a crontab in my system and make a folder in var directory that a bash script will reside there and make all the actual work.
I want during the installation to install the crontab, make the folder and echo there the script or copy it and the removing it from the module folder. Is something like that possible?
Put your bash script in mymodule/bin/ā¦ then it will get Symlinked to /usr/local/bin I believe.
Freepbx has itās own cron processer you can use to set a cron job. Iām not in front of a system right now so I canāt point you at where to look but probably grep through framework
Yep got it after a while. Pretty sweet function. Well i actually i need two more things.
My module needs incrond package to work properly, can i check during installation if this package is installed and if not exit the installation? I can set dependencies on the module.xml file but can it be a system package?
Also i need to execute a command, well basically set the incrotab, i saw that some modules use the exec function but it seems that i can do specific stuff, can i add incrotab to this list?