Automate osTicket & ISPConfig 3

Xavier Mustin

Administrator
Staff member
#1
Automate osTicket & ISPConfig 3


I am using Debian and I'm running a hosting platform on it called ISPConfig 3 (its free - give it a google).
This mini - tutorial is to automate the behind the scenes processes of osTicket (email retrieval and sending)

As I have devoted part of my life to scour the internet and the terribly documented osTicket website for methods to run such a simple process, I thought it was warranted to give back to the Open Source community with the help of this little guide.

So as you may know osTicket can use the autocron method which relies on admin users to be logged in and active to retrieve emails and then to send them to the necessary parties. To me that was unacceptable, it meant that days would go by without me realizing that people had responded, when in reality I could have responded much more quickly but was expecting an email. Whats the purpose of an automatic support ticket system that isn't automated?

Anyway enough of my waffle and now the guide:

osTicket for most people would be installed in /var/www/osticket or /var/www/support or something else.

All we need to do is add the following code to cron.

CODE: SELECT ALL
crontab -e

add this to the bottom of cron

CODE: SELECT ALL
# Run osTicket every 5 min
*/5 * * * * /usr/bin/php-cgi /var/www/example.com/web/support/api/cron.php


Now because I have ISPConfig 3 it creates containers for websites so for most people this is probably more accurate:

CODE: SELECT ALL
# Run osTicket every 5 min
*/5 * * * * /usr/bin/php-cgi /var/www/osTicket/api/cron.php


the first part of sentence says every 5 mins
the second is running php-cgi
the third is telling it what and where

Simple, then a simple exit (automatically saved) with

CODE: SELECT ALL
Ctrl - X

and blam it should be working nicely.

I used this check to make sure cron was actually running for me:

CODE: SELECT ALL
tail -f /var/log/syslog | grep cron
 
Haut