Menu

incron

0 Comment

So I’ve finally got incron working, although for a while I forgot I had removed it from the services (not sure why I did that now?!?) before my upgrade to Fedora 16.

So, a quick

service incrond start
chkconfig incrond on

later (well not so quick as the service command failed to return, I shoved it in the background and carried on regardless, things are working so I should be okay) incron is ready to run.

Next add the monitored file/directory, type of monitoring and task to perform when monitored action occurs to the config (am assuming you’ve already got permission to run incron, use man 5 incron for how):

incrontab -e

/home/me/Aptana\ Studio\ 3\ Workspace/[hidden due to client confidentiality]/themes/[hidden due to client confidentiality] IN_CREATE,IN_DELETE,IN_CLOSE_WRITE /home/me/Aptana\ Studio\ 3\ Workspace/pushtodebian

The above translates to “any files in the working directory” that are “created, deleted or written to” will “trigger my rsync script”.

For anyone trying to follow the debugging instructions on Fedora 16, we should look in /var/log/messages not syslog as we don’t have a syslog file.

Aptana

As you can see from the working directory, I’ve moved over to Aptana 3 after adding one too many plugins to GEdit (or maybe more than one too many). GEdit was crashing when moving around too quickly on my SSH shares or doing somthing crazy like right clicking.

After realising that I ignored Aptana’s advice the first time round and tried to run it with Open JDK, I installed Sun JDK and Aptana has worked like a trooper since. Not a rival for Visual Studio in my mind but considering the price difference and the fact I want to be on a linux box, a jolly fine IDE.

All this while working on a project that I took over after original contractor gave up a day before the already extended deadline. Aptana has speeded things up for me no end, not having to shell out to use ack to find in files feels like the good old days when I worked exclusively with .net on the MS stack. Plus its ability to highlight silly markup errors and even missing php brackets/end statments is really nice. I just need to learn how to get git working from inside of it – for now I’m sticking with the command line, I have to spend some time actually writing code.

If Aptana supported working from SSH shares, I wouldn’t have to use incron, but for now it seems to be the best I can hope for.