Installatron List Builer and Update Summary Emails

For urgent and private issues, open a support ticket instead of posting: https://secure.installatron.com/tickets
Post Reply
groenleer
Posts: 4
Joined: Sat Oct 02, 2010 10:22 am

Installatron List Builer and Update Summary Emails

Post by groenleer » Sat Oct 02, 2010 10:33 am

Hi Folks,

When an update for new software becomes available the Installatron engine can notify the admin with an Update Summary Email, also an new list can be generated with the List Builder.

For an integration at one of our clients we are looking to hook in to one of these scripts. (Preferable the email part).

We need to know which new software is available to list this in a database for our client.
We rather do not hook on to a csv file with actual information. We only need to know about new software.

Can some one tell me where i can find the scripts ??

Phil
Staff
Posts: 490
Joined: Tue Jun 19, 2007 6:06 am

Re: Installatron List Builer and Update Summary Emails

Post by Phil » Sun Oct 03, 2010 10:43 am

Hello,

I'm little unsure of the question. You're looking for a method to programmatically obtain a list of Installatron updates?

The first method I can think of would be to hook into the Installatron update stream at installatron.com:

http://installatron.com/log

Another method would iterate over all the directories at /var/installatron/installers/*/*, checking the last-modified dates to construct a list of the most recently added applications and application versions.

Thank you,
Phil.
Phillip Stier
Installatron Co-Founder

groenleer
Posts: 4
Joined: Sat Oct 02, 2010 10:22 am

Re: Installatron List Builer and Update Summary Emails

Post by groenleer » Mon Oct 04, 2010 6:21 am

Hi Phil,

Thanks for your reply.
The installatron log isn't sufficient for us.
As it doesn't hold the entries of Oktober, 3rd. at this moment.
Also at night an email is sent that can be customized in DA and other controlpanels.
We are working with DA.

At night there is an update script running for Installatron.
Getting new versions and installers that are available.
This script dispatches an email. At our system it runs somewhere near 3.30 AM.

The email we receive is built as the example below:

Code: Select all

UPDATED INSTALLERS

mambo 4.51.0.9
If we could hook in to this script it would be great.
Otherwise we have to use the listbuilder (which requires some intermediate steps...)

Phil
Staff
Posts: 490
Joined: Tue Jun 19, 2007 6:06 am

Re: Installatron List Builer and Update Summary Emails

Post by Phil » Mon Oct 04, 2010 9:01 am

Hello,

We've added a hook to the latest edge build that should accommodate this request. To update:

Code: Select all

/usr/local/installatron/repair -f --edge
Then create the below file. It should be chmod 600 and owned by root to prevent a security hole.

Code: Select all

/usr/local/installatron/etc/hook_update_notification.php

Code: Select all

<?php

		if (isset($f["listInstallersUpdated"]))
		{
			foreach ( $f["listInstallersUpdated"] as $appId => $newVersions )
			{
				foreach ( $newVersions as $newVersion )
				{
					echo "$appId $newVersion now available!\n";
				}
			}
		}

?>
If there are any questions let us know.

Thanks,
Phil.
Phillip Stier
Installatron Co-Founder

groenleer
Posts: 4
Joined: Sat Oct 02, 2010 10:22 am

Re: Installatron List Builer and Update Summary Emails

Post by groenleer » Mon Oct 18, 2010 2:45 am

Hi Phil (and others)

I have applied this hook script,
in the mean time some updates came available.
I see them in Installatron.

But, the hook script did not send any emails out, nor did it call my calls to the weblog where we want to publish the updates.


Is there any documentation available on what file permissions are needed etc ?

Phil
Staff
Posts: 490
Joined: Tue Jun 19, 2007 6:06 am

Re: Installatron List Builer and Update Summary Emails

Post by Phil » Mon Oct 18, 2010 4:37 am

groenleer wrote:the hook script did not send any emails out, nor did it call my calls to the weblog where we want to publish the updates.
Hello,

Can you confirm or deny that Installatron did call the hook script? Note core updates wouldn't be included in the $f["listInstallersUpdated"] array, that only includes application installer updates. If you wish to also send an email for any core updates, you can access the new core version from the $f["strNewVersion"] variable. Note each of these variables are NOT defined when there are no updates.

The hook script at /usr/local/installatron/etc/hook_update_notification.php should be chmod 0600 and owned by root:root.

Feel free to open a ticket with the contents of the hook script you're using and we'll evaluate it for you:
https://installatron.com/contact

Thanks,
Phil.
Phillip Stier
Installatron Co-Founder

groenleer
Posts: 4
Joined: Sat Oct 02, 2010 10:22 am

Re: Installatron List Builer and Update Summary Emails

Post by groenleer » Mon Oct 18, 2010 7:19 am

I have added today some more debug commands at the top op the script to print the $f var to a file.
This works fine if i run a repair by hand.

Now i have to wait for a new / updated installer. Is there a way to remove an installer and have it added again?

Phil
Staff
Posts: 490
Joined: Tue Jun 19, 2007 6:06 am

Re: Installatron List Builer and Update Summary Emails

Post by Phil » Mon Oct 18, 2010 7:45 pm

Hello,

Yeah, you can remove any of these directories:

/var/installatron/installers/joomla
/var/installatron/installers/phpbb

Note because these will be considered "new" applications and added to this array:

$f["listInstallersNew"]

If there are any questions let us know.

Thank you,
Phil.
Phillip Stier
Installatron Co-Founder

Post Reply